Hi,
I'm trying to get an error message to popup when no date has checked/ticked. Except the problem is the error message never pops up!
The code I have relating to my DTPick1 control are:
And
Does anyone have some experience with this date control and see where/how I'm going wrong?? Thank you
I'm trying to get an error message to popup when no date has checked/ticked. Except the problem is the error message never pops up!
The code I have relating to my DTPick1 control are:
Code:
Private Sub UserForm_Activate()
Sheets("Records").Select
Worksheets("Records").Range("Start").End(xlDown).Select
EmployeeNameBox = ""
DTPicker1.Value = ""
HoursDepositBox = ""
Timesheethoursbox = ""
Selection.Offset(1, 4) = ""
End Sub
And
Code:
Private Sub NextForm_Click()
Dim MoveForward As Boolean
Dim Boxx As String
MoveForward = True
If EmployeeNameBox = "" Then
MsgBox ("You have not selected an employee name")
MoveForward = False
Boxx = "EmployeeNameBox"
ElseIf DTPicker1.Value = "" Then *** The problem seems to be here somewhere
MsgBox ("You have not selected an date")
MoveForward = False
Boxx = "DTPicker1"
end if
Does anyone have some experience with this date control and see where/how I'm going wrong?? Thank you