D
David
I am trying to ensure that the user enters the first day of the month when
prompted, so I need to test the day from the date entered. The month and year
do not matter. Thanks!
Here is what I have, but it does not work:
myDate = InputBox(Prompt:="Enter the FIRST DAY of the Month you want to
Create", _
Default:=Format(Date, "mm/dd/yy"))
DayDate = myDate(Day) '(THIS IS WHERE THE PROBLEM IS)
If DayDate <> 1 Then
Msg = " You Did Not Enter The First Day of The Month" & Chr(10) & _
" Are You SURE You Want To Continue?"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then Exit Sub
End If
prompted, so I need to test the day from the date entered. The month and year
do not matter. Thanks!
Here is what I have, but it does not work:
myDate = InputBox(Prompt:="Enter the FIRST DAY of the Month you want to
Create", _
Default:=Format(Date, "mm/dd/yy"))
DayDate = myDate(Day) '(THIS IS WHERE THE PROBLEM IS)
If DayDate <> 1 Then
Msg = " You Did Not Enter The First Day of The Month" & Chr(10) & _
" Are You SURE You Want To Continue?"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then Exit Sub
End If