Custom toolbars in templates

D

D Riggins

I have created a custom toolbar in and Excel 2003 template. The toolbar has
buttons that execute VBA subroutines. The Toolbar seems to function properly
in the template, but when a new file is created from the template, the
buttons for the subroutines produce errors. It appears that the toolbar in
the new file is trying to execute the sub in the template. How do you make
sure custom toolbar buttons execute the VBA sub in the workbook created from
a template?
 
S

Spreadsheet Solutions

Well;

You must be sure to refer to right workbook.
The worbook that you want to have the code executed on, must be the active
workbook.

So, set good reference to your workbooks, or work with statements like
Workbooks(XYZ).Activate
 
D

Dave Peterson

Check your other post, too.

D said:
I have created a custom toolbar in and Excel 2003 template. The toolbar has
buttons that execute VBA subroutines. The Toolbar seems to function properly
in the template, but when a new file is created from the template, the
buttons for the subroutines produce errors. It appears that the toolbar in
the new file is trying to execute the sub in the template. How do you make
sure custom toolbar buttons execute the VBA sub in the workbook created from
a template?
 

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