K
KD
I am unable to enter more that one character (2.00 but not 26.00) in a
textbox. I have the format set to ###.00 in another procedure. I
think this is the procedure that is causing the problem. Is there a
format length in here?
Private Sub TextBox80_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case Asc("0") To Asc("9")
If InStr(1, Me.TextBox80.Text, "$") > 0 Or
Me.TextBox80.SelStart > 0 Then
KeyAscii = 0
End If
Case Asc(".")
If InStr(1, Me.TextBox80.Text, ".") > 0 Then
KeyAscii = 0
End If
Case Else
KeyAscii = 0
End Select
End Sub
Thanks,
James
textbox. I have the format set to ###.00 in another procedure. I
think this is the procedure that is causing the problem. Is there a
format length in here?
Private Sub TextBox80_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case Asc("0") To Asc("9")
If InStr(1, Me.TextBox80.Text, "$") > 0 Or
Me.TextBox80.SelStart > 0 Then
KeyAscii = 0
End If
Case Asc(".")
If InStr(1, Me.TextBox80.Text, ".") > 0 Then
KeyAscii = 0
End If
Case Else
KeyAscii = 0
End Select
End Sub
Thanks,
James