User form validation


Posted by rob a on January 23, 2002 6:26 AM

I have a re used user form that asks for a date and then stores it in a variable in a macro. It checks that the input is a date by using if (not isDate (,txt...) then I need to change this so that it checks for a specific format i.e dd_mm_yy with the dd mm yy as wild cards. Thanks



Posted by Jacob on January 23, 2002 8:10 AM

Hi

You can change it like this
MyVariable = Textbox1.value
MyVariable = Application.Worksheetfunction.Text(MyVariable,"dd mm yy")

HTH

Jacob