pop up calender in a userform

A

Albert

Hi Guys,
I know this has been done ad nausiam but can someone give me the code, that
when a user clicks into a textbox the calender should pop up so as to enter
the date? This will be done in the form and not in the worksheet
Thanks
Albert
 
T

The Dude

You must add the "Calendar Control #" in the userform's toolbar (with a right
click).
 
R

Rick Rothstein \(MVP - VB\)

I know this has been done ad nausiam but can someone give me the code,
that
when a user clicks into a textbox the calender should pop up so as to
enter
the date? This will be done in the form and not in the worksheet

You can you a "date picker" control for this... go to your UserForm and
right-click the ToolBox, select "Additional Controls" and select "Microsoft
Date and Time Picker Control 6.0 (SP6)" from the list that appears. You can
place this control on your UserForm and it will allow the user to type the
date parts, use Tab and Arrow Keys to do change the date parts or to click
the down arrow and pick the date from a drop-down calendar.

Rick
 
R

Rick Rothstein \(MVP - VB\)

This link...

http://msdn2.microsoft.com/en-us/library/bb761726(VS.85).aspx

while from a non-VBA help file, should give you an idea of how to use the
Date and Time Picker Control. The preset format "constants" have slightly
different names in the article than what you will see when (if) you assign a
preset format to the Format property, but everything in the article appears
to be relevant to the VBA implementation (at least it looks so on a quick
glance).

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top