input box for a date -- how to make an enter key the current date
Jason, try the below
Sub Macro1()
Dim dtTemp As Date
varDate = InputBox("Enter Date", , Format(Date, "dd-mmm-yyyy"))
If IsDate(varDate) Then dtTemp = varDate Else dtTemp = Date
MsgBox dtTemp
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"JasonK" wrote:
thanks for all your help --
i have a macro that has an input box that requires a date. is there a
way to make the current date the input if the user just hits ENTER
without typing a date?
Currently, if the user just hits enter, the macro crashes.
thanks again,
JasonK
|