I
Ian Andrews
Have used to following to validate a textbox, but this accepts dates as being
ok. I only want Time values
Private Sub TxtJanlight1on1_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles TxtJanlight1on1.Validating
If TxtJanlight1on1.Text <> "" AndAlso Not
IsDate(TxtJanlight1on1.Text) Then
MsgBox("Please enter a Valid Time Format, MUST BE AS 07:30:00,
Value has been defaulted to 00:00:00")
e.Cancel = True
TxtJanlight1on1.Text = "00:00:00"
End If
End Sub
What can I do to reject dates and only accept valid time values ?
ok. I only want Time values
Private Sub TxtJanlight1on1_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles TxtJanlight1on1.Validating
If TxtJanlight1on1.Text <> "" AndAlso Not
IsDate(TxtJanlight1on1.Text) Then
MsgBox("Please enter a Valid Time Format, MUST BE AS 07:30:00,
Value has been defaulted to 00:00:00")
e.Cancel = True
TxtJanlight1on1.Text = "00:00:00"
End If
End Sub
What can I do to reject dates and only accept valid time values ?