set date format of text box

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

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!
 
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
 

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

Back
Top