ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to run a macro if I don't know the name in advance (https://www.excelbanter.com/excel-programming/442399-how-run-macro-if-i-dont-know-name-advance.html)

Himanshu

How to run a macro if I don't know the name in advance
 
I am trying to create a macro on the fly using vb code from an existing file,
and then run the Macro that was just created. Is there a way to find out the
name of a Macro programmatically so that I can pass it to the Application.Run
method?







JLGWhiz[_2_]

How to run a macro if I don't know the name in advance
 
Maybe:

myMacroName = Application.Dialogs(xlDialogMacroOptions).Show


"Himanshu" wrote in message
...
I am trying to create a macro on the fly using vb code from an existing
file,
and then run the Macro that was just created. Is there a way to find out
the
name of a Macro programmatically so that I can pass it to the
Application.Run
method?










All times are GMT +1. The time now is 07:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com