Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to call an existing excel 4.0 macro in a macro written in vba in excel 2002
The excel 4.0 macros are quite complex so I don't want to convert them any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can try using the run command
Run "XL4SheetName!NameOnXL4MacroSheet" This is supposed to work. -- Regards, Tom Ogilvy "Dave" wrote in message ... I want to call an existing excel 4.0 macro in a macro written in vba in excel 2002. The excel 4.0 macros are quite complex so I don't want to convert them. any ideas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave,
Never done it myself, but VBA has an ExecuteExcel4Macro method which should do want you want. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Dave" wrote in message ... I want to call an existing excel 4.0 macro in a macro written in vba in excel 2002. The excel 4.0 macros are quite complex so I don't want to convert them. any ideas? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oops, apparently that is only for built-ins. Found this post by Jim Rech
which explains it ExecuteExcel4Macro is used only to execute built-in Excel 4 macro functions not your own XL4 code. To do that from VB you have to Run it: Run "Macro1!XL4_Code" Here there is a cell named "XL4_Code" on the XL4 macro sheet named "Macro1". My XL4 code begins at this cell. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Bob Phillips" wrote in message ... Hi Dave, Never done it myself, but VBA has an ExecuteExcel4Macro method which should do want you want. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Dave" wrote in message ... I want to call an existing excel 4.0 macro in a macro written in vba in excel 2002. The excel 4.0 macros are quite complex so I don't want to convert them. any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Refresh Error when calling Excel Macro from VB.NET program | Excel Discussion (Misc queries) | |||
calling "Fact()" from a macro in excel 2002 | Excel Worksheet Functions | |||
Calling .net Component from Excel Macro | Excel Discussion (Misc queries) | |||
Calling ApplyCustomType for Excel 2002 in C# | Excel Programming | |||
calling a dll from excel macro | Excel Programming |