Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to call a procedure using a variable? I tried
Call reportname & "Report" reportname is a string variable. I got a error when I tried this. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
application.run reportname & "Report"
ranswrt wrote: Is there a way to call a procedure using a variable? I tried Call reportname & "Report" reportname is a string variable. I got a error when I tried this. Thanks -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Whatever you use after the word "Call" must equate to the procedure name only, with any arguments place in parentheses. myProcedure = DoASort Call myProcedure(Range("A1:A100") Unless the concatenated word is part of the name, it will throw an error. "ranswrt" wrote: Is there a way to call a procedure using a variable? I tried Call reportname & "Report" reportname is a string variable. I got a error when I tried this. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You
"Dave Peterson" wrote: application.run reportname & "Report" ranswrt wrote: Is there a way to call a procedure using a variable? I tried Call reportname & "Report" reportname is a string variable. I got a error when I tried this. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a Range variable to call a procedure with a ByVal statement... | Excel Programming | |||
Call a procedure whose name is stored in a variable | Excel Programming | |||
Variable procedure call | Excel Programming | |||
Call procedure using variable | Excel Programming | |||
can I call a procedure using a variable | Excel Programming |