Posts by chester1993

    Hey royUK . I have downloaded your calendar form. I must say, this is very good. I think my concern now is, how do I make it work on my project? Obviously, I was thinking of putting a new command button beside the textboxes to call the calendar. How do I make the dates appear on the textbox? And, is there anything else I need to change on your original codes to make it work?

    Thanks, royUK . I will try that tomorrow as I am just about to go to bed now and using mobile.

    Also, date picker was my first option and been searching thru the web on how to activate it. However, I can't seem to find it on my Excel. I thought maybe it wasn't installed which makes it worst.

    This application will be use by my team in the office and we downloading stuff outside is strictly prohibited. That's why I am trying to find a way to make this work.

    I appreciate your input, though. I'll try if this will work tomorrow.

    Hello Team,

    Back here again for another question. That sounds like a vlog on YT. LOL

    I have attached a sample workbook for this question.

    On this workbook I have 4 dates, 1 on a label and was set during initialize.

    The 3 other dates will be entered by the user on the textboxes.

    What am I expecting to accomplish:

    1. Each textboxes were assign to show "MM/DD/YYYY" during initialize. I set a MouseDown behavior on each textbox so when the user clicked on that textbox, the text "MM/DD/YYYY" disappears. The issue here is, when a user clicked outside textbox1 or clicked on textbox2 without putting any value on textbox1, it does not reset the textbox1 value to "MM/DD/YYYY". How would I go about setting that up?

    2. I want to set all textboxes to only accept dates or numerical values instead of texts/letters., if possible.

    3. I want to calculate the date difference of 2 dates but with different format outputs. First instance, I want to calculate the different of Date 1 and Date 2 but the output will be difference of Days. Second instance, I want to calculate the difference of Date 3 and 4 but the output will be difference of Years. Ideally, this will be calculated automatically once both dates are entered. Then, the output of the 1st instance will be displayed automatically on Textbox5. The output of the 2nd instance will be displayed automatically on Textbox6.


    • Sample.xlsm

      (21.73 kB, downloaded 27 times, last: )

    DISCLAIMER: Posting this for a new project I am planning to work on.

    I want to create a UserForm with multiple Command Buttons and a single checkbox.

    What I am hoping to achieve here is when I click on that single checkbox (CheckBox1), the captions on the Command Buttons will change.

    A simple example would be: CommandButton1 caption is "A" and when CheckBox1 is ticked it would change to "a".

    After this, when I click on the command button I am looking at 2 scenarios:

    1. that caption to be automatically copied to clipboard. I'll paste it somewhere else like Notepad, etc.

    2. that caption to be automatically copied and pasted to TextBox1 of the same userform.

    Thanks everyone!

    I love this forum! I am learning a lot here. :*<3

    I think I found another way to do it. Sharing it here for future use. Works fine.

    Hey royUK . On the reset button you created on this UserForm, I am having a variable not defined error.

    My code here is, and I modified yours:

    1. Sub Reset()
    2. ''///reset all controls using Function
    3. Me.ComboBox1.ListIndex = -1
    4. Me.ComboBox2.ListIndex = -1
    5. Me.TextBox1.Value = Empty
    6. Me.TextBox2.Value = Empty
    7. For iX = 1 To 19
    8. Me("CheckBox" & iX) = False
    9. Next iX
    10. End Sub

    As you can see, I now have 2 ComboBoxes, 2 TextBoxes and 19 CheckBoxes I need to clear.

    I am using the same reset code for my other userform with 15 checkboxes and is working fine.

    Name of the checkboxes are default only that's why I have "CheckBox" there instead of "chk" from the one you initially shared.

    What do you think is making that error here?

    As the title says, I have Label2 and Textbox2 on UserForm1. I want the value of this textbox to appear on TextBox1 (same userform) with Label1 showing first.

    Note, there are other values on the textbox1 other than the textbox2 value.

    Below is my code to show values of other functions to TextBox1.

    Hello All,

    As you can see on the attached sample (this is not the actual workbook), I have 3 command buttons on a UserForm opening a link thru my non-default browser which is IE. What I am looking to achieve is to assign these command buttons to different hyperlinks using the 1 checkbox. On my actual project, I only need 1 checkbox to change all the hyperlinks on all the buttons.

    For instance, instead of the currently assigned links. I want it changed to the ff after clicking the checkbox:

    Open -

    Open -

    Open -

    I appreciate the help, folks!


    • Sample.xlsm

      (19.71 kB, downloaded 33 times, last: )

    Hey royUK . So I found the problem here. Initially, my command buttons are inside a frame that's why it is not working. When the buttons are outside the frame, they work perfectly. It's all good, though. I just re-made my form to suit the code and have it working.

    I have another question in connection with this, but, I will create a new thread about it to avoid confusion.

    I don't even know what's going on anymore. Maybe, I have to re-do my UserForm to reset any conflicts on the codes or something.

    But, what if, IE is already my default browser and I want to use Firefox or Chrome? How do I modify the code to use the browser I prefer?

    Thanks again for you patience and help royUK .

    You said worksheet.

    What is in the click event of your commandbutton?

    Man, i really need to learn how to call names in excel. LOL

    What I mean is on the project I am working on, I copy the code and paste it on the UserForm. Changed it to the caption of the Command Button. And nothing happens. Here are my codes: