hi guys. i have a user form which has "start date" and "end date"
both have one combobox, which lists months Jan to Dec..and then there are two text boxes where a user inputs a day (ex: 14) and a year (ex: 2009)
Here is the code:
Private Sub UserForm_Initialize()
With cbxEndMonth
.AddItem "Jan"
.AddItem "Feb"
.AddItem "Mar"
.AddItem "Apr"
.AddItem "May"
.AddItem "Jun"
.AddItem "Jul"
.AddItem "Aug"
.AddItem "Sep"
.AddItem "Oct"
.AddItem "Nov"
.AddItem "Dec"
End With
cbxEndMonth.ListIndex = 0
With cbxStartMonth
.AddItem "Jan"
.AddItem "Feb"
.AddItem "Mar"
.AddItem "Apr"
.AddItem "May"
.AddItem "Jun"
.AddItem "Jul"
.AddItem "Aug"
.AddItem "Sep"
.AddItem "Oct"
.AddItem "Nov"
.AddItem "Dec"
End With
cbxStartMonth.ListIndex = 0
End Sub
I would like to have the current date show up in the "end date". So I would like the cbxEndMonth checkbox to show the current month, and the end day ("txtEndDay") and end year ("txtEndYear") show the current day and year.
So when a open a user form, it'll display nothing in the first (start date) inputs and have the current
Feb (in checkbox) 24 (in text box ) and 2010 (in other text box) in the End Date section.
Is that possible? Thank you all in advance!
Bookmarks