PDA

View Full Version : numeric



oleg_v
10-04-2010, 10:00 PM
hi
how can check with the help of vba if cells value is numeric or not?

thanks

lehgzil
10-04-2010, 10:26 PM
hi,
i use something like this
Private Sub Worksheet_Change(ByVal Target As Range)
'lets say your cells value is on sheet1 @ cell a1
If Not IsNumeric(Sheets("sheet1").Range("a1").Value) Then
MsgBox "not number"
End If
End Sub
on the sheet module.
hope this helps.