Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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?





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Refresh Error when calling Excel Macro from VB.NET program amdefacto Excel Discussion (Misc queries) 0 July 6th 09 10:06 AM
calling "Fact()" from a macro in excel 2002 Joe Farruggio Excel Worksheet Functions 1 December 3rd 06 10:58 PM
Calling .net Component from Excel Macro j_koushik Excel Discussion (Misc queries) 0 September 30th 05 06:26 AM
Calling ApplyCustomType for Excel 2002 in C# SJ[_5_] Excel Programming 1 December 12th 03 01:10 AM
calling a dll from excel macro Stefan[_4_] Excel Programming 1 December 12th 03 12:16 AM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"