Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default set date format of text box

I have a user form text box that I want to format so on a
date (01/01/04) can be inputed. How can I set the format
to only accept a date format?

My spreadsheet date column is formatted for the date but
my user form accepts any input and populates the
spreadsheet!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default set date format of text box

Dan,

This will check if it's a date:

If IsDate(Me.Textbox1.Text) then
' yada yada
End if

Or you could use the Calendar Control from Additional Controls in the
UserForm Toolbox.

hth,

Doug Glancy

"Dan" wrote in message
...
I have a user form text box that I want to format so on a
date (01/01/04) can be inputed. How can I set the format
to only accept a date format?

My spreadsheet date column is formatted for the date but
my user form accepts any input and populates the
spreadsheet!



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
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Convert date from text format to date format Anita Excel Discussion (Misc queries) 3 June 4th 07 11:57 AM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier[_2_] Excel Programming 0 September 22nd 04 03:26 PM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Excel Programming 1 November 24th 03 11:33 PM


All times are GMT +1. The time now is 02:46 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"