PC Review


Reply
Thread Tools Rate Thread

Application.Inputbox question

 
 
Nemo
Guest
Posts: n/a
 
      26th Sep 2008
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
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      26th Sep 2008
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
 
Reply With Quote
 
Captain Nemo
Guest
Posts: n/a
 
      27th Sep 2008
In article <(E-Mail Removed)>,
Dave Peterson <(E-Mail Removed)> wrote:

> 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
>
>


Hi Dave -

Got it. Thanks.

....best, Capt. N.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Application.InputBox(,,,,,8) JsJ_Slim Microsoft Excel Programming 3 8th Aug 2008 02:32 AM
application.inputbox =?Utf-8?B?Q2hyaXN0bWFzIE1heQ==?= Microsoft Excel Programming 5 22nd Nov 2006 04:11 PM
Inputbox and Application.InputBox Maria Microsoft Excel Programming 1 20th Sep 2004 11:36 AM
application.inputbox Murat Microsoft Excel Programming 4 24th Feb 2004 11:38 AM
Application.Inputbox Question ndp Microsoft Excel Programming 3 8th Dec 2003 06:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:36 PM.