Hello everyone, be gentle as I'm new. I used the following code to only allow text bx entries for keycodes 1 through 9, back space, tab, key number pad 0 through 9 and decimal. All are functional with the exception of the decimal.
Can anyone make a suggestion as to how to get it to work?
Most appreciative.
Private Sub TextBox6_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyCode
Case vbKey0 To vbKey9, vbKeyBack, vbKeyDecimal, vbKeyTab, vbKeyBack, vbKeyNumpad0 To vbKeyNumpad9
Case Else
KeyCode = False
End Select
End Sub
Can anyone make a suggestion as to how to get it to work?
Most appreciative.
Private Sub TextBox6_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyCode
Case vbKey0 To vbKey9, vbKeyBack, vbKeyDecimal, vbKeyTab, vbKeyBack, vbKeyNumpad0 To vbKeyNumpad9
Case Else
KeyCode = False
End Select
End Sub