M
maywood
Hi,
I am using an InputBox to enter a date. This date should be copied into the
cell (4,7) in the format "mmm. yy". How to manage that.
Here is my code for the inputbox:
Private Sub CommandButton2_Click()
Dim d As Date
On Error GoTo err
Begin:
d = InputBox("Please enter a start date for the scenario!", _
"Start date")
If IsDate(d) And d >= "01.01.2008" Then
Else
MsgBox "No existing input data for this date!"
GoTo Begin
End If
Exit Sub
err:
MsgBox "Please only enter a valid date!"
GoTo Begin
End Sub
I am using an InputBox to enter a date. This date should be copied into the
cell (4,7) in the format "mmm. yy". How to manage that.
Here is my code for the inputbox:
Private Sub CommandButton2_Click()
Dim d As Date
On Error GoTo err
Begin:
d = InputBox("Please enter a start date for the scenario!", _
"Start date")
If IsDate(d) And d >= "01.01.2008" Then
Else
MsgBox "No existing input data for this date!"
GoTo Begin
End If
Exit Sub
err:
MsgBox "Please only enter a valid date!"
GoTo Begin
End Sub