Jump to content
Macro Express Forums

How to launch macro from excel?


Recommended Posts

This is very similar question to question 31 in the knowledge base. I am hoping that some one has come up with a better solution in 9 years.

 

I want to launch a macro express macro from excel, VBA. I first thought it would be simple by launching via the commandline and pass along some variables, but have not figured out how to launch dos command from excel. Excel does have the capability to send DDE commands via vba and wondered I can do something similar with Macro Express. Here is an example code of DDE Execute from Excel to Word

 

channelNumber = Application.DDEInitiate( _

app:="WinWord", _

topic:="C:\WINWORD\FORMLETR.DOC")

Application.DDEExecute channelNumber, "[FILEPRINT]"

Application.DDETerminate channelNumber

I would also need to pass along some variables.

 

Any clue how I can launch a Macro Express macro from Excel?

 

Thanks

CryptOrchid

Link to comment
Share on other sites

In launching a macro from Excel, you need to consider whether or not you want to wait until the macro has finished before continuing in Excel.

 

If you need to d0 this often - i.e. several times a minute - then there's a better way of launching your macro. If you do this only infrequently then Shell (or its wait variation) is OK.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...