ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Macros (https://www.excelbanter.com/excel-programming/289164-excel-macros.html)

Matt[_23_]

Excel Macros
 
Is there a way to programatically list all embedded macros
in a particular workbook? I need to access a workbook
object and update a listbox with all available macros.
thanks.

Bob Phillips[_6_]

Excel Macros
 
Matt,

Take a look at http://www.cpearson.com/excel/vbe.htm. There is enough code
there to show you how.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Matt" wrote in message
...
Is there a way to programatically list all embedded macros
in a particular workbook? I need to access a workbook
object and update a listbox with all available macros.
thanks.




Tom Ogilvy

Excel Macros
 
http://tinyurl.com/2opra

should provide some sample code.

For general information, see Chip Pearson's site on programming the VBE

http://www.cpearson.com/excel/vbe.htm

basically you have to parse all the modules looking for Sub and Function and
extracting the name.

this assumes you don't want to just show the built in macro selection
dialog.

--
Regards,
Tom Ogilvy

Matt wrote in message
...
Is there a way to programatically list all embedded macros
in a particular workbook? I need to access a workbook
object and update a listbox with all available macros.
thanks.




Ron de Bruin

Excel Macros
 
Hi Matt

Try Chip Pearson's page
I believe he have a example

http://www.cpearson.com/excel/vbe.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Matt" wrote in message ...
Is there a way to programatically list all embedded macros
in a particular workbook? I need to access a workbook
object and update a listbox with all available macros.
thanks.





All times are GMT +1. The time now is 10:30 AM.

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