Thread: IsDate
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] aidan.heritage@virgin.net is offline
external usenet poster
 
Posts: 244
Default IsDate

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?