Chip Pearson has some instructions on how to remove code on the fly.
http://www.cpearson.com/excel/vbe.htm
But I like Ben's suggestion, too.
If the template is really a template (*.xlt) and the workbook that's created is
really a new workbook based on that template, you can check the path of that
workbook. If it's = "", then the workbook hasn't been saved and you can do your
stuff.
option explicit
sub workbook_open()
if me.path < "" then
exit sub
end if
'keep going
end sub
Ed wrote:
I have a "master template" workbook. When the user fills in certain
information, the workbook generates a name for itself and performs a SaveAs
NewFileName.
The master has Open, Close, and Worksheet_Change events that are not needed
in the new workbooks. Is there an easy way to remove or disable these event
codes when the new workbook is created by SaveAs?
Ed
--
Dave Peterson