R
RC
Hello, I have the following code.
InputVal2 = InputBox(Prompt:="Please enter macro start date in MM/DD/
YY format" _
, Title:="Starting Date Entry", _
Default:=(DateFormat(ActiveProject.CurrentDate,
pjDate_mm_dd_yy)))
If InputVal2 < ActiveProject.ProjectStart Then
MsgBox "Starting date is before Project Start, macro
ending"
Exit Sub
ElseIf InputVal2 = False Then
MsgBox "Starting date entry cancelled by user, macro
ending"
Exit Sub
Else
InputDate = CDate(InputVal2)
End If
I keep getting a "Type Mismatch" error when I click the "Cancel"
button. The value of InputVal2 always seems to be equal to 12:00:00
AM. I thought that hitting Cancel in the Inputbox would either return
0 or False, I've tried both. Any advice?
Thank you!
InputVal2 = InputBox(Prompt:="Please enter macro start date in MM/DD/
YY format" _
, Title:="Starting Date Entry", _
Default:=(DateFormat(ActiveProject.CurrentDate,
pjDate_mm_dd_yy)))
If InputVal2 < ActiveProject.ProjectStart Then
MsgBox "Starting date is before Project Start, macro
ending"
Exit Sub
ElseIf InputVal2 = False Then
MsgBox "Starting date entry cancelled by user, macro
ending"
Exit Sub
Else
InputDate = CDate(InputVal2)
End If
I keep getting a "Type Mismatch" error when I click the "Cancel"
button. The value of InputVal2 always seems to be equal to 12:00:00
AM. I thought that hitting Cancel in the Inputbox would either return
0 or False, I've tried both. Any advice?
Thank you!