View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Application.Inputbox question

One way:

Option Explicit
Sub testme()
Dim resp As Variant
resp = Application.InputBox(Prompt:="Number", Type:=1)

If CStr(resp) = "False" Then
MsgBox "Cancel"
Else
MsgBox resp
End If
End Sub



Nemo wrote:

Hi All -

Using an application.inputbox for numbers, and I understand Cancel =
FALSE, and FALSE = zero.

I need zero to be an acceptable number. How do I separate the FALSE from
the zero?

Thanks in advance.
...Capt. Nemo


--

Dave Peterson