ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running cade on new file from template (https://www.excelbanter.com/excel-programming/312137-running-cade-new-file-template.html)

FTL

Running cade on new file from template
 
Hi
Anyone who can tell me how to run some code when I make a new workbook from
a template?
I want it to run only when I create a new document, not when opening it
later.

FTL



Bob Phillips[_6_]

Running cade on new file from template
 
Have the code as workbook open code, and then at the end delete it.

See http://www.cpearson.com/excel/vbe.htm to update code on the fly.

Might be a good idea to use OnTime to trigger a delete macro at the end of
the workbook open routine. Again, see
http://www.cpearson.com/excel/ontime.htm for details.

--

HTH

RP

"FTL" wrote in message
...
Hi
Anyone who can tell me how to run some code when I make a new workbook

from
a template?
I want it to run only when I create a new document, not when opening it
later.

FTL






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

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