Document can't find form, code in template?

E

Ed

I created a template ( .dot) to hold some macros, UserForms, and library
references. The template resides in my UserName\Application
Data\Microsoft\Templates folder, alongside my Normal.dot. I then created a
new document based on this template, and created a Document_Open macro that
calls the UserForm (named "StartUp") in the template using StartUp.Show.

When opened, the code in the doc will not find the form ("Object required"
error). If I copy the form into the doc and code the buttons to fire macros
in the template, the macros can't be found.

What am I missing in my understanding to make this work?

Ed
 
E

Ed

Okay - I found something at least. I can use Call or Application.Run and
specify the template and macro. I'm already working around this a different
way, but if I forget and search the NG, then I'll find this and remember.
Or someone else may need to know this.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top