Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Problem with macros in custom excel template

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?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Problem with macros in custom excel template

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

On Wed, 20 Feb 2008 11:30:02 -0800, return2300
wrote:

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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 custom macros/icons Tom Kreutz Excel Discussion (Misc queries) 2 December 6th 07 01:48 PM
Custom toolbar for template - macros not working Ann Scharpf Excel Discussion (Misc queries) 2 February 5th 07 10:54 PM
custom form in Excel Template - ??? cbroomas Excel Discussion (Misc queries) 0 January 30th 07 03:32 PM
Have problem sending spreadsheet email and losing custom toolbar and macros memphoman Excel Discussion (Misc queries) 0 January 19th 06 08:40 PM
How do I import formmail data to a custom excel template? cxlough41 Excel Worksheet Functions 1 July 1st 05 12:59 AM


All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"