Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Template Functionality

Hi All
I have developed an application and saved this as a template file. A
separate loader programme opens this template and populates a number of
sheets in the template and saving the template as a 'normal' workbook with a
new name. This process in repeated 15 times for different datasets. My
question concerns how does a template (xlt) file differ from a normal wks
file?

In my template I have some macros required for the final application,
including a workbook open event. I was under the impression that the
template would not run its macros upon opening - it clearly does! - how do
I disable the macros in the template so that they only run when it is saved
as an wks workbook?

--
Cheers
Nigel




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Template Functionality

With ThisWorkbook
If .Name = .FullName Then Exit Sub
End With

--

Vasant



"Nigel" wrote in message
...
Hi All
I have developed an application and saved this as a template file. A
separate loader programme opens this template and populates a number of
sheets in the template and saving the template as a 'normal' workbook with

a
new name. This process in repeated 15 times for different datasets. My
question concerns how does a template (xlt) file differ from a normal wks
file?

In my template I have some macros required for the final application,
including a workbook open event. I was under the impression that the
template would not run its macros upon opening - it clearly does! - how

do
I disable the macros in the template so that they only run when it is

saved
as an wks workbook?

--
Cheers
Nigel






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Template Functionality


"Nigel" wrote in message ...
Hi All
I have developed an application and saved this as a template file. A
separate loader programme opens this template and populates a number of
sheets in the template and saving the template as a 'normal' workbook with a
new name. This process in repeated 15 times for different datasets. My
question concerns how does a template (xlt) file differ from a normal wks
file?

In my template I have some macros required for the final application,
including a workbook open event. I was under the impression that the
template would not run its macros upon opening - it clearly does! - how do
I disable the macros in the template so that they only run when it is saved
as an wks workbook?

--
Cheers
Nigel






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Template Functionality

Oops on the 1st reply!

Private Sub Workbook_Open()
If Me.FileFormat = xlTemplate Then Exit Sub
'do other stuff
'do other stuff
'do other stuff
'do other stuff
'do other stuff
'do other stuff
End Sub

Regards - Steve


"Nigel" wrote in message ...
Hi All
I have developed an application and saved this as a template file. A
separate loader programme opens this template and populates a number of
sheets in the template and saving the template as a 'normal' workbook with a
new name. This process in repeated 15 times for different datasets. My
question concerns how does a template (xlt) file differ from a normal wks
file?

In my template I have some macros required for the final application,
including a workbook open event. I was under the impression that the
template would not run its macros upon opening - it clearly does! - how do
I disable the macros in the template so that they only run when it is saved
as an wks workbook?

--
Cheers
Nigel






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
Excel Template functionality without using "File-New" Denise Excel Discussion (Misc queries) 3 January 8th 10 07:27 PM
Is it bug or functionality? Surinder Singh Excel Discussion (Misc queries) 6 February 9th 09 01:28 PM
Odd functionality Amber Excel Worksheet Functions 4 July 10th 07 10:12 PM
Go to functionality [email protected] Excel Worksheet Functions 0 November 7th 06 10:08 PM
Template functionality in Excel Abi Excel Discussion (Misc queries) 4 January 14th 05 12:23 AM


All times are GMT +1. The time now is 10:42 PM.

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

About Us

"It's about Microsoft Excel"