J
James
Hi, I want to create a document template that contains some VBA code to
create a custom toolbar.
I want this to run when:
1. A user creates a new document from the template, or
2. A user opens an existing document created from the template.
I know I can put VBA code in the Document_New and Document_Open events to
make this happen, but one annoying consequence of this is that the VBA code
fires when I open the template to make changes to it.
Is there a way to detect when the I am opening the template itself for
editing and prevent the VBA code from running?
create a custom toolbar.
I want this to run when:
1. A user creates a new document from the template, or
2. A user opens an existing document created from the template.
I know I can put VBA code in the Document_New and Document_Open events to
make this happen, but one annoying consequence of this is that the VBA code
fires when I open the template to make changes to it.
Is there a way to detect when the I am opening the template itself for
editing and prevent the VBA code from running?