Hi i am adding numeric values in textboxs & found this code on the forum
works great in only allowing numbers to be entered in to the selected
textboxs...
but what i want is NumberFormat = "h:mm;@" i.e 13:00 - 09:30
any sugestions
bernie
Private Sub TextBox24_Change()
OnlyNumbers
End Sub
Private Sub OnlyNumbers1()
Stop
If TypeName(Me.ActiveControl) = "TextBox" Then
With Me.ActiveControl
If Not IsNumeric(.Value) And .Value <> vbNullString Then
MsgBox "Sorry, only numbers allowed"
.Value = vbNullString
End If
End With
End If
works great in only allowing numbers to be entered in to the selected
textboxs...
but what i want is NumberFormat = "h:mm;@" i.e 13:00 - 09:30
any sugestions
bernie
Private Sub TextBox24_Change()
OnlyNumbers
End Sub
Private Sub OnlyNumbers1()
Stop
If TypeName(Me.ActiveControl) = "TextBox" Then
With Me.ActiveControl
If Not IsNumeric(.Value) And .Value <> vbNullString Then
MsgBox "Sorry, only numbers allowed"
.Value = vbNullString
End If
End With
End If