ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating Macros at runtime (https://www.excelbanter.com/excel-programming/378013-creating-macros-runtime.html)

Rob Edwards

Creating Macros at runtime
 
Hi,
I have a macro that creates a seperate workbook from info
provided. This is saved as a different filename each time. No problem
here!

What I want to do is "attach" some simple macros (i.e. sort etc) to
the this newly created workbook. Can I either create a new macro from a
source one or alternatively just simply copy an existing macro to a new
workbook?

Please advise.

Rob Edwards.

Always look on the bright side of life!

*** Sent via Developersdex http://www.developersdex.com ***

Bob Phillips

Creating Macros at runtime
 
I would create the new workbook from a template workbook that already has
the code in it.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Rob Edwards" wrote in message
...
Hi,
I have a macro that creates a seperate workbook from info
provided. This is saved as a different filename each time. No problem
here!

What I want to do is "attach" some simple macros (i.e. sort etc) to
the this newly created workbook. Can I either create a new macro from a
source one or alternatively just simply copy an existing macro to a new
workbook?

Please advise.

Rob Edwards.

Always look on the bright side of life!

*** Sent via Developersdex http://www.developersdex.com ***





All times are GMT +1. The time now is 05:34 PM.

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