Hey,
Got a userform in which people can submit certain codes. The data from the different textboxes is copied to certain cells in the integer format. (I have to import this data in SAS later on so I need this format)
If I type a letter, I get a type mismatch and the debugger starts. I just want an error message like: only numeric values are allowed.
Here is the syntaxt for 1 textbox:
Anyone who can give me a clue?
Private Sub TBpanel_Change()
Worksheets("sheet1").Range("A2").Value = Int(TBpanel)
This doesn`t work:
'If Not IsNumeric(TBpanel.Value) Then
' MsgBox "Alleen numerieke data is toegestaan", vbExclamation, "Invalid Entry"
'End If
End Sub
Cheers,
Dinictus.
Got a userform in which people can submit certain codes. The data from the different textboxes is copied to certain cells in the integer format. (I have to import this data in SAS later on so I need this format)
If I type a letter, I get a type mismatch and the debugger starts. I just want an error message like: only numeric values are allowed.
Here is the syntaxt for 1 textbox:
Anyone who can give me a clue?
Private Sub TBpanel_Change()
Worksheets("sheet1").Range("A2").Value = Int(TBpanel)
This doesn`t work:
'If Not IsNumeric(TBpanel.Value) Then
' MsgBox "Alleen numerieke data is toegestaan", vbExclamation, "Invalid Entry"
'End If
End Sub
Cheers,
Dinictus.