Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Date entry in userform help

Hello,

I am trying to code a UserForm date entry technique using a TextBox
and a SpinButton but not having much luck at it. What I want to do is
have the date displayed in the text box as October 16, 2003. When I
hover over the month, it is hilighted and the spin button can be used
to select a new month. The same concept applies to the day and year
settings.

So my question is how is this done? I know that such a control exists
because is see done in Windows dialogs. In fact I have a couple apps
installed on my computer that popup dialogs and contain date setting
fields that do exactly as above.

I couldn't find anything on this subject in the couple Excel and VBA
books I have. Any help or suggestions would be appreciated. TIA ...

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Date entry in userform help

You might want to check this out...
In Excel 2000 and higher there is a Calendar control on the Control Toolbar.
This shows a full calander.

Right click on the Controls Toolbox
Click Additional Tools
Select Calendar Control

Play with the Properties to get what you want.

(I haven't worked with this, yet)

--
sb
"bmwmcrider" wrote in message
om...
Hello,

I am trying to code a UserForm date entry technique using a TextBox
and a SpinButton but not having much luck at it. What I want to do is
have the date displayed in the text box as October 16, 2003. When I
hover over the month, it is hilighted and the spin button can be used
to select a new month. The same concept applies to the day and year
settings.

So my question is how is this done? I know that such a control exists
because is see done in Windows dialogs. In fact I have a couple apps
installed on my computer that popup dialogs and contain date setting
fields that do exactly as above.

I couldn't find anything on this subject in the couple Excel and VBA
books I have. Any help or suggestions would be appreciated. TIA ...

Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date entry in userform help

Hi Steve,

Thanks for the reply. I am already familiar with the Calendar control;
there is also a MonthView control for entering a date.

However, both these controls take up a lot of space in the form. I am
trying to get a more compact control presentation for entering a date.
Thus, the TextBox control concept.

Mike




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date entry in userform help

You just put the code in the events of the spin buttons to increment the
value in the textbox. A special control for this function may exist, but
it is very straight forward using just a textbox and a spin button or three
textboxes and three spin buttons if you want to control month day and year
separately - you could have three spin buttons and a single textbox, but I
think that would be more confusing to the user.

If you want a sample workbook, send me an email with a valid email return
address.

--
Regards,
Tom Ogilvy



bmwmcrider wrote in message
...
Hi Steve,

Thanks for the reply. I am already familiar with the Calendar control;
there is also a MonthView control for entering a date.

However, both these controls take up a lot of space in the form. I am
trying to get a more compact control presentation for entering a date.
Thus, the TextBox control concept.

Mike




*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Format for Userform TextBox John Calder New Users to Excel 4 July 29th 09 10:19 PM
Excel 2002 date entry: Cannot get away from d-m-yy entry format Steve Eklund Excel Discussion (Misc queries) 3 May 11th 09 04:57 PM
userform date issue Woodi2 Excel Worksheet Functions 4 February 7th 09 02:18 PM
Restrict date format for UserForm Rob Excel Discussion (Misc queries) 2 December 19th 05 12:13 AM
Userform Date validation David Goodall Excel Programming 6 August 19th 03 11:46 PM


All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"