Thread: IsDate
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
april27 april27 is offline
external usenet poster
 
Posts: 27
Default IsDate

thanks. but what is a valid date? although I type a correct date (i think)
e.g. 20060612 the program sends me error message. do you know´how to solve
the problem or write the date in proper form? Very thankful for fast
assistance!!


" skrev:

if(not(isdate(TextBoxName.text))) then
msgbox "You have not entered a valid date - please retry
cancel=true
end if

this would go in the exit event of the text box
april27 wrote:
I am writing a macro for an Excel spreadsheet. in a user form i have a text
field. in this field the user shall enter a date. the program shall then
revise the date and return an error message if it is not a date. I try to use
the IsDate function but i dont know how to use it and my help menu does not
give me any info on this. anyone?