ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   insert macro in new workbook (https://www.excelbanter.com/excel-programming/272915-insert-macro-new-workbook.html)

Douvid[_2_]

insert macro in new workbook
 
Hi,
How can I create a new workbook from vba, execute some
codes in it. But I also want to assign a macro in that new
workbook. So I can put a before save macro inside this
workbook.
Cheers,
David



Dick Kusleika

insert macro in new workbook
 
David

Start here

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

This page shows how to create code with code. Post back if you get stuck.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Douvid" wrote in message
...
Hi,
How can I create a new workbook from vba, execute some
codes in it. But I also want to assign a macro in that new
workbook. So I can put a before save macro inside this
workbook.
Cheers,
David






All times are GMT +1. The time now is 01:20 AM.

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