PDA

View Full Version : Solved: Data picker and commandbuttons control



jmaocubo
01-08-2013, 05:17 AM
Hi....
I'm trying to create 3 textboxes containing 3 different dates.
For this I am using a template I found on the net and a userform I created.
The problem is I have one button for each textbox. When I click on button 1 and select a date, that date goes to the 3 textboxes.

How to make: click on the button 1 then calendar appears, select date and in textbox1 that date appears, then select button 2 and the date chosen goes to textbox2, ...

File example in attach


Thanks in advance

Miguel

BrianMH
01-08-2013, 07:56 AM
I can't open your file as it gives me an error saying the form isn't installed on my machine. I can suggest instead of directly updating the value of the textbox from the calendar updating a public variable with the calendar and then having your click events update the text box with this variable.

Kenneth Hobs
01-08-2013, 12:25 PM
You could use the Date and Time Picker Control from c:\windows\system32\mscomct2.ocx. http://www.vbaexpress.com/forum/showthread.php?p=257190

jmaocubo
01-09-2013, 02:22 AM
Thanks BrianMH and Kenneth for the help. Using:
(http://www.vbaexpress.com/forum/member.php?u=20620)http://www.vbaexpress.com/forum/showthread.php?p=257190