ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dynamically adding a macro to a new worksheet (https://www.excelbanter.com/excel-programming/339753-dynamically-adding-macro-new-worksheet.html)

Fred Russell

Dynamically adding a macro to a new worksheet
 
How can I programmically add a macro to a new worksheet that was just
created?
I want to add a macro called "Private Sub Worksheet_Activate()" with
control lines for making toolbar buttons visible or not visible.

Any help or direction will be greatly appreciated.

Best regards,
Fred



Norman Jones

Dynamically adding a macro to a new worksheet
 
Hi Fred,

See Chip Pearson's page on VBE programming:

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


---
Regards,
Norman



"Fred Russell" wrote in message
...
How can I programmically add a macro to a new worksheet that was just
created?
I want to add a macro called "Private Sub Worksheet_Activate()" with
control lines for making toolbar buttons visible or not visible.

Any help or direction will be greatly appreciated.

Best regards,
Fred




Tom Ogilvy

Dynamically adding a macro to a new worksheet
 
See Chip Pearson's page on programming the VBE for an example:

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

--
Regards,
Tom Ogilvy

"Fred Russell" wrote in message
...
How can I programmically add a macro to a new worksheet that was just
created?
I want to add a macro called "Private Sub Worksheet_Activate()" with
control lines for making toolbar buttons visible or not visible.

Any help or direction will be greatly appreciated.

Best regards,
Fred





Fred Russell

Dynamically adding a macro to a new worksheet
 
Thanks for your help! Spot on.



Fred Russell

Dynamically adding a macro to a new worksheet
 
Thanks for the help! Spot on.




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

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