#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default InputBox

I am using John Walkenbach's excellent EXCEL 2006 - POWER PROGRAMMING WITH VBA

On page there is the following code

Set UserRange = Application.InputBox( _
Promopt:=Prompt, _
Title:=Title, _
Default:=ActiveCell.Address, _
Type:=8)


I have verified that this code complies and runs as indicated in the book.

On the previous page the author advises the reader not to confuse Excel's
InputBox function with VBA's InputBox function.

On page 326 the author writes "specifying a Type argument of 8 for the
InputBox method is the key to this procedure"

I have been unsuccessful in trying to find out anything about Excel's
InputBox procedure. I have tried jumping around in Excel's help file and
haven't been able to see any mention of this procedure. I would sure
appreciate it if someone could show me, with some specificity, how to find
out about this procedure.
--
-regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 301
Default InputBox

Function
x=Inputbox("Age?")

Method:
x=Application.Inputbox("Age?",Type:=1)

There is no Type argument in the Function vesion.


"GeorgeJ" wrote in message
...
I am using John Walkenbach's excellent EXCEL 2006 - POWER PROGRAMMING WITH
VBA

On page there is the following code

Set UserRange = Application.InputBox( _
Promopt:=Prompt, _
Title:=Title, _
Default:=ActiveCell.Address, _
Type:=8)


I have verified that this code complies and runs as indicated in the book.

On the previous page the author advises the reader not to confuse Excel's
InputBox function with VBA's InputBox function.

On page 326 the author writes "specifying a Type argument of 8 for the
InputBox method is the key to this procedure"

I have been unsuccessful in trying to find out anything about Excel's
InputBox procedure. I have tried jumping around in Excel's help file and
haven't been able to see any mention of this procedure. I would sure
appreciate it if someone could show me, with some specificity, how to find
out about this procedure.
--
-regards



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default InputBox


--
-Thank you Bob. So, as I understand it, there is both a function and a
method version of InputBox in Excel. How might I find out more about the
method version? Specifically, what the Type parameter means. If someone
could walk me through exactly how one finds out about the details of a method
such as InputBox in Excel 2007 I would be most appreciative.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default InputBox

From VBA help.................

Type Optional Variant. Specifies the return data type. If this argument is
omitted, the dialog box returns text. Can be one or a sum of the following
values.

Value Meaning
0 A formula
1 A number
2 Text (a string)
4 A logical value (True or False)
8 A cell reference, as a Range object
16 An error value, such as #N/A
64 An array of values


Gord Dibben MS Excel MVP


On Wed, 11 Jul 2007 13:54:03 -0700, GeorgeJ
wrote:

-Thank you Bob. So, as I understand it, there is both a function and a
method version of InputBox in Excel. How might I find out more about the
method version? Specifically, what the Type parameter means. If someone
could walk me through exactly how one finds out about the details of a method
such as InputBox in Excel 2007 I would be most appreciative.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default InputBox


--Thank you Gord. That was extremely helpful. I am very impressed and
grateful for the prompt help available on this forum.

I will repeat my more general questions

1) what exactly does Walkenback mean when he writes (pg. 324) " Do not
confuse Excel's InputBox method with VBA's InputBox function. Although these
two items have the same name they are not the same" ? Can someone show a
short bit of VBA code which uses both the Excel Inputbox method and VBA
InputBox Function ?

2) Is there any way, other than posting a question on this forum, that I
could have discovered the information Gord presented on his post? This forum
is great but I am trying to find out if there is any way to find information
on the details of Excel methods such as InputBox without going to a forum.
Perhaps I'm not using Excel's help system efficiently, but I drew a blank
when I tried to use HELP to find InputBox. If someone could specify the
exact trail I should have followed it would be very helpful to me.

-regards


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default InputBox

I found the material I posted in VBA help under "InputBox".

The top two items returned were "InputBox Method" as it applies to Application
and "InputBox Function(VBA)


Gord

On Wed, 11 Jul 2007 16:32:02 -0700, GeorgeJ
wrote:


--Thank you Gord. That was extremely helpful. I am very impressed and
grateful for the prompt help available on this forum.

I will repeat my more general questions

1) what exactly does Walkenback mean when he writes (pg. 324) " Do not
confuse Excel's InputBox method with VBA's InputBox function. Although these
two items have the same name they are not the same" ? Can someone show a
short bit of VBA code which uses both the Excel Inputbox method and VBA
InputBox Function ?

2) Is there any way, other than posting a question on this forum, that I
could have discovered the information Gord presented on his post? This forum
is great but I am trying to find out if there is any way to find information
on the details of Excel methods such as InputBox without going to a forum.
Perhaps I'm not using Excel's help system efficiently, but I drew a blank
when I tried to use HELP to find InputBox. If someone could specify the
exact trail I should have followed it would be very helpful to me.

-regards


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another InputBox question... Phil Excel Discussion (Misc queries) 4 April 12th 07 03:37 PM
inputbox brownti via OfficeKB.com Excel Discussion (Misc queries) 2 February 9th 07 02:37 PM
InputBox size jamphan Excel Discussion (Misc queries) 0 April 6th 06 09:01 PM
Inputbox with VBA Jeff Excel Discussion (Misc queries) 3 January 19th 06 05:18 PM
Inputbox with Listbox Jeff Excel Discussion (Misc queries) 3 December 22nd 04 05:54 PM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"