View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kuzemdoo Dawuni Kuzemdoo Dawuni is offline
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