Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
FTL FTL is offline
external usenet poster
 
Posts: 1
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File running slow! hoyos Excel Discussion (Misc queries) 6 January 31st 10 08:36 PM
Template for Excel to keep running record? Will Sutton Excel Discussion (Misc queries) 0 June 28th 05 10:28 PM
Running a .bat file via AppActivate Kevin Excel Programming 1 April 10th 04 10:53 PM
Running a batch file from VB Graham Carter Excel Programming 3 August 29th 03 04:18 PM
Running a macro on a template donny Excel Programming 0 July 22nd 03 01:23 AM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"