Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Range("A1") Question

Hi all,
I have a question that has bothered me for a while.
I have a procedure in Excel VBA that gets input from excel worksheet. I have
3 worksheets in the workbook, input, sheet2, and misc.

my procedure in the module is

GetInput(F as double, Q as double)

I call the procedure thus;

call GetIput(range("input!A1").value)

and

call GetInput(range("misc!A1").value)

the strange thing is the first call statement executes without problem but
the second reports errors. it does not understand the range statement.
I have worked around this by using the following for the second call statement

call GetInput(worksheet("misc").range("A1").value).

My question is, why doesn't the statement with the range("misc!A1") work. I
will appreciate some assistance on this.
Kuze
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Range("A1") Question

It the call in the worksheet module. if so, the unqualified Range refers to
the sheet where the code is located - which means you have a single range
statement refering to multiple sheets.

try using
GetInput [Misc!A1]


--
Regards,
Tom Ogilvy

"Kuzemdoo Dawuni" wrote in
message ...
Hi all,
I have a question that has bothered me for a while.
I have a procedure in Excel VBA that gets input from excel worksheet. I

have
3 worksheets in the workbook, input, sheet2, and misc.

my procedure in the module is

GetInput(F as double, Q as double)

I call the procedure thus;

call GetIput(range("input!A1").value)

and

call GetInput(range("misc!A1").value)

the strange thing is the first call statement executes without problem but
the second reports errors. it does not understand the range statement.
I have worked around this by using the following for the second call

statement

call GetInput(worksheet("misc").range("A1").value).

My question is, why doesn't the statement with the range("misc!A1") work.

I
will appreciate some assistance on this.
Kuze



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Range("A1") Question

Thanks will try that.


"Tom Ogilvy" wrote:

It the call in the worksheet module. if so, the unqualified Range refers to
the sheet where the code is located - which means you have a single range
statement refering to multiple sheets.

try using
GetInput [Misc!A1]


--
Regards,
Tom Ogilvy

"Kuzemdoo Dawuni" wrote in
message ...
Hi all,
I have a question that has bothered me for a while.
I have a procedure in Excel VBA that gets input from excel worksheet. I

have
3 worksheets in the workbook, input, sheet2, and misc.

my procedure in the module is

GetInput(F as double, Q as double)

I call the procedure thus;

call GetIput(range("input!A1").value)

and

call GetInput(range("misc!A1").value)

the strange thing is the first call statement executes without problem but
the second reports errors. it does not understand the range statement.
I have worked around this by using the following for the second call

statement

call GetInput(worksheet("misc").range("A1").value).

My question is, why doesn't the statement with the range("misc!A1") work.

I
will appreciate some assistance on this.
Kuze




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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"Disk is Full" add-on question to "Can't reset last cell" post tod [email protected] Excel Discussion (Misc queries) 0 January 22nd 07 02:32 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM
Question about sorting and "key" range values TBA[_2_] Excel Programming 3 September 25th 03 02:01 PM


All times are GMT +1. The time now is 02:14 PM.

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

About Us

"It's about Microsoft Excel"