Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am looking for a code that will automatically check an input box to make sure the values entered are accurate. I don't know how to check to make sure the month entered is the full name (and spelled correctly), and if not an error message comes up to prompt for a correct entry. Thanks in advance! Sub testdate() Dim MyDate Dim Message As String, Title As String Dim current_date As String MyDate = Format(Date, "mmmm yyy") Message = "ENTER FULL MONTH AND YEAR FOR REPORT:" Title = "Enter Date" Default = MyDate current_date = InputBox(Message, Title, Default) Application.ScreenUpdating = False With Sheets("Summary").Range("B2") .NumberFormat = "mmmm yyy" .Value = current_date End With Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to check valid Date value? | Excel Worksheet Functions | |||
Checking user has input a valid address. | Excel Programming | |||
Check if date is valid | Excel Programming | |||
Waiting for a valid input | Excel Programming | |||
check for valid file | Excel Programming |