![]() |
Calling an excel 4.0 macro from vba in Excel 2002
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? |
Calling an excel 4.0 macro from vba in Excel 2002
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? |
Calling an excel 4.0 macro from vba in Excel 2002
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? |
Calling an excel 4.0 macro from vba in Excel 2002
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? |
All times are GMT +1. The time now is 10:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com