Problem with macros in custom excel template

R

return2300

I'm trying to create templates in Excel 2003 that will be copied from a
single network location. I created a toolbar to access the macros for this
template and as
the person who created them they work fine for me, but when anyone else tries
to access them the macros don't work from the toolbar. I've gone into the
macro window and they're all present and work when I run them from there, but
the average user will of course not go that route. I've gone in to the
template multiple times to reattach the macros to the toolbar and every time
the macro resets to saying Book.xlt!insertworksheet instead of
insertworksheet. The error that users see say that book.xls cannot be
located. Does anyone know how to get around this problem?
 
G

Gord Dibben

Save yourself this kind of grief by creating a Toolbar when the Template is run.

The buttons will be assigned to the active workbook which is the one just
created by the Template.

Leave the macros in the Template as is but add Workbook_Open code to create the
Toolbar and Workbook_BeforeClose to delete it when the new book is saved and
closed.

See Debra Dalgleish's site for instructions and code.

http://www.contextures.on.ca/xlToolbar02.html

Note: Dave uses the Auto_Open and Close events, not the Workbook_Open and Close
events.

Same thing and with Dave's method, all code goes into a single module for ease
of copying.


Gord Dibben MS Excel MVP
 

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