View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Office_Novice Office_Novice is offline
external usenet poster
 
Posts: 245
Default How do I run macros upon opening only if it is not the template?

Try putting the code in Workbook_New rather then _open. This should solve
your problem

"davis6206" wrote:

I currently have a Private Sub that is supposed to run on Workbook_Open. It
runs macros when I open that particular workbook. However, that workbook is
a template. I don't want the macros to run when I'm opening the template. I
only want them to run if I'm creating a new workbook using that template.
How do I tell it to run the macros depending on whether I'm opening the
template or creating a new workbook using the template?