PDA

View Full Version : Solved: Excel 2003 - Need to determine if any text has been entered into a numbers only cell



frank_m
12-28-2010, 01:28 AM
I Need to determine if any text has been entered into a numbers only cell.

I know this can be done with cell validation, but in this case I need to do it using VBA.

Thanks

frank_m
12-28-2010, 02:22 AM
Thanks for your time - I Got it figured out
Dim BoolVal As Boolean
BoolVal = IsNumeric(ActiveCell.Offset(0, 9 - ActiveCell.Column).Value)
If BoolVal = False Then
MsgBox "Only a numeric value can be entered into Column 9"
Exit Sub
End If