bjfulkerson
asked on
How do I add a date picker to a text box in a userform in Excel 2007
How do I add a date picker to a text box in a userform in Excel 2007
What do you mean when you say "add a date picker to a text box"? Do you mean that you want the result of the selection in a date picker to appear in a textbox?
ASKER
I want to be able to pick a date from a calendar and populate a text box with that date.
Here's a few links explaining how to place an ActiveX date picker control into an Excel 2007 worksheet ...
http://www.fontstuff.com/excel/exltut03.htm
http://www.rondebruin.nl/win/s8/win003.htm
http://www.fontstuff.com/excel/exltut03.htm
http://www.rondebruin.nl/win/s8/win003.htm
ASKER
Can this be done in a userForm
Can this be done in a userFormThe second link above says ...
How to Create a userform with a calendar or Date Picker control on it
So it must be possible.
You could also try this free addon ...
http://www.excel-it.com/excel_datepickers.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am on Excel 2007, and I do not see that option.
I'm not sure which "option" you mean, so please explain. But here is a demo workbook that shows the results of the above steps.
Q-28582649.xls
Q-28582649.xls
ASKER
I got it to work.
Private Sub Calendar1_Click()
TxtDate.Text = Calendar1.Value
End Sub
Private Sub Calendar1_Click()
TxtDate.Text = Calendar1.Value
End Sub
I suggest you use the Change event instead.
But in any case I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
Private Sub Calendar1_Change()
TxtDate.Text = Calendar1.Value
End Sub
But in any case I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
ASKER
Thanks