pedie
Well-known Member
- Joined
- Apr 28, 2010
- Messages
- 3,875
Hi,
My current code below.
I need help in modifying this code.
If user clicks on cancel exit sub - msgbox "canceled".
if inputbox.value = "" then exit sub msgbox "canceled - no date".
if date is not entered and random number is entered then msgbox "incorrect date entered..."
else run my code.
Any assistance will be appriciated.
Thanks alot in advance!
My current code below.
I need help in modifying this code.
If user clicks on cancel exit sub - msgbox "canceled".
if inputbox.value = "" then exit sub msgbox "canceled - no date".
if date is not entered and random number is entered then msgbox "incorrect date entered..."
else run my code.
Any assistance will be appriciated.
Thanks alot in advance!
Code:
Private Sub CommandButton1_Click()
x = InputBox("Enter Date", "Date input", Format(Date, "mm/dd/yyyy"))
Range("M39").Value = x
If Range("N39").Value = "Yes" Then
MsgBox "U have done this" & Range("M39").Value & "Please enter another date"
Exit Sub
Else
updddate
updatetime
End If
End Sub