![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 10:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com