• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Userform ComboBox Load Previous Recorded Info [Solved]

Status
Not open for further replies.

jansjane

Member
Hello masters of VBA,
I have anther difficult questions (for me) to you.
I set up an userform to fill information, when click "submit" it auto populates to a worksheet. I set one cmd button to "close" the userform in userform interface, and another "open form" button within worksheet when I need to re-open the userform.
Here is my question:
After I "close" the userform interface, is there a possibility that when I click "Open Form" in worksheet, the combobox shows up previously entered value? When open a new worksheet, there are no previous values entered, it will show blank.

Thank you for your time and help.
 
If I can continue to ask another questions.
How can I set up a default value base on time of the year? Lets say I have a combo box and lists of value of A and B,
Default value = A for this combo box when May-Dec
Default Value = B when Jan - April
I wish that depends on time of year to open the userform, it will auto load the default value
Thank you so much!
 
Something like this.
Code:
Dim currentMonth As Integer

currentMonth = Month(Date)

Select Case currentMonth

Case 5 To 12
    'your code for May to Dec
Case 1 To 4
    'your code for Jan to Apr
End Select
 
Status
Not open for further replies.
Back
Top