Thread: NaN Validation?
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default NaN Validation?

One more option is to use the application.inputbox.


Option Explicit
Sub test()
Dim myNumber As Variant
myNumber = Application.InputBox(prompt:="Number me!", Type:=1)
If myNumber = False Then
Exit Sub 'cancel
End If
'keep going
End Sub



MrPixie wrote:

What's the best way to validate that something is not a number (or is a
number, for that matter) in excel VBA?
I need to handle an input box with this validation.


--

Dave Peterson