Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check inputbox enter is in correct format
Surely the format isn't important, just whether it is a date or not
Dim ans ans = InputBox("Please supply date") If IsDate(ans) Then Range("A1").Value = Format(ans, "dd/mm/yy") Else MsgBox "Invalid date" End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "mcphc" wrote in message ... How do I check if a users entry into an inputbox is of the format dd/mm/yyyy. It would be sufficient to just check that the first 2 characters are numbers, the third is "/" the fifth and sixth are numbers, etc. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
What's the correct format to check the name of a sheet? | Excel Programming | |||
Inputbox to enter a % | Excel Programming | |||
Check on the input in an inputbox | Excel Programming | |||
Inputbox to enter date | Excel Programming |