Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
"Disk is Full" add-on question to "Can't reset last cell" post tod | Excel Discussion (Misc queries) | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming | |||
Question about sorting and "key" range values | Excel Programming |