Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I run macros upon opening only if it is not the template?
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Template opening | Excel Discussion (Misc queries) | |||
Opening a template.xls using VBA code. | Excel Programming | |||
Opening a template .xls with VBA code | Excel Programming | |||
Open workbook-macros enabled, opening another with macros | Excel Programming | |||
Opening Template | Excel Programming |