Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a procedure called Report_Extend that looks like this:
Sub Report_Extend(datearr As Variant) End Sub Sub testextend() Dim datearr(5) As Date Report_Extend datearr End Sub This code compiles without complaint. However, when I try to run Report_Extend via Tools/Macro/Macros, Report_Extend does not appear in the select list. On the other hand I have a test procedure called testextend (shown above) and I can run it which calls Report_Extend and everything works fine. If I change the definition of Report_Extend to have no parameter: Sub Report_Extend() then it appears in the Tools/Macro/Macros list, but then doesn't work since it needs the array parameter. Anybody know why this Report_Extend disappears when I include its parameter declaration? This is using Excel 2003 SP3. Denis |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 20, 7:52*pm, Denis wrote:
I have a procedure called Report_Extend that looks like this: Sub Report_Extend(datearr As Variant) End Sub Sub testextend() * * Dim datearr(5) As Date * * Report_Extend datearr End Sub This code compiles without complaint. *However, when I try to run Report_Extend via Tools/Macro/Macros, Report_Extend does not appear in the select list. *On the other hand I have a test procedure called testextend (shown above) and I can run it which calls Report_Extend and everything works fine. If I change the definition of Report_Extend to have no parameter: Sub Report_Extend() then it appears in the Tools/Macro/Macros list, but then doesn't work since it needs the array parameter. Anybody know why this Report_Extend disappears when I include its parameter declaration? *This is using Excel 2003 SP3. Denis I don't believe that you can directly run a sub that needs arguments as the UI has no mechanism to supply them. As you pointed out, you need a :helper" macro to supply the inputs. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 20, 7:02*pm, James Ravenswood
wrote: On Jan 20, 7:52*pm, Denis wrote: I have a procedure called Report_Extend that looks like this: Sub Report_Extend(datearr As Variant) End Sub Sub testextend() * * Dim datearr(5) As Date * * Report_Extend datearr End Sub This code compiles without complaint. *However, when I try to run Report_Extend via Tools/Macro/Macros, Report_Extend does not appear in the select list. *On the other hand I have a test procedure called testextend (shown above) and I can run it which calls Report_Extend and everything works fine. If I change the definition of Report_Extend to have no parameter: Sub Report_Extend() then it appears in the Tools/Macro/Macros list, but then doesn't work since it needs the array parameter. Anybody know why this Report_Extend disappears when I include its parameter declaration? *This is using Excel 2003 SP3. Denis I don't believe that you can directly run a sub that needs arguments as the UI has no mechanism to supply them. *As you pointed out, you need a :helper" macro to supply the inputs. Well, of course, you can't run such a procedure directly. Thanks for pointing out what I should have been able to figure out. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop a Procedure from another procedure | Excel Discussion (Misc queries) | |||
Ending Procedure When Condition is Met Anywhere in Procedure | Excel Programming | |||
Stop Procedure when an Error occurs in another procedure | Excel Programming | |||
How to jump from a Form procedure to a Workbook or Module procedure? | Excel Programming |