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