#1   Report Post  
Wazooli
 
Posts: n/a
Default Book.xlt

I have made several modifications to my Book.xlt, including some VBA code and
custom buttons with macros assigned to them. The problem is that when I hit
one button that is linked to code in module 1, it always opens Book.xlt to
acccess the macro. What am I doing wrong. I only want Book.xlt to open if I
want to edit it.

On a separate but related issue, what code can I use to simultaneously save
Book.xlt, when changed, to each of 4 separate locations?

wazooli
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

Wazooli

BOOK.XLT is a Template upon which new workbooks are based.

I think you should keep macros out of there.

Instead place your macros in Personal.xls which can open in a "hidden" state.

The customizations to menus and buttons can be made on the fly when
Personal.xls opens.

Or you can make the customizations to a regular menus and toolbars,

These customizations are saved in an *.XLB file so they are available for
every workbook.

Personal.xls is created the first time you record a Macro using Macro
Recorder.

ToolsMacroRecord New Macro. A dialog box will come up asking you name the
macro and where to place it. Pick Personal Macro Workbook from the dropdown.
Copy and paste a couple of cells then Stop Recording.

You now have a Personal.xls in your Office\XLSTART folder. You can go to
Visual Basic Editor(Alt+F11) to view the macro you just recorded in a Module.

You can add more macros by recording or by typing/copying them into the
Module.

You can do a FileSave from there or better yet hit ALT + Q to return to the
Excel window.

Then with Personal.xls active, hit WindowHide.

When you close Excel you will be asked if you want to save Personal.xls. Yes!

It will open hidden next time you start Excel.

NOTE: when assigning macros to buttons or menu items you will have to precede
the macro name with Personal.xls.

i.e. Personal.xls!macroname

An alternative to Personal.xls is to create an add-in(*.xla) with your macros
in it and load it through ToolsAdd-ins.

The benefit of this is that you don't have to precede the macro name with the
filename.

A disadvantage is that you will not see the macros in the ToolsMacroMacros
dialog.


Gord Dibben Excel MVP

On Thu, 31 Mar 2005 16:03:02 -0800, "Wazooli"
wrote:

I have made several modifications to my Book.xlt, including some VBA code and
custom buttons with macros assigned to them. The problem is that when I hit
one button that is linked to code in module 1, it always opens Book.xlt to
acccess the macro. What am I doing wrong. I only want Book.xlt to open if I
want to edit it.

On a separate but related issue, what code can I use to simultaneously save
Book.xlt, when changed, to each of 4 separate locations?

wazooli


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
2003 Excel isn't reading the book.xlt file on startup. rlweaver007 Excel Discussion (Misc queries) 1 March 15th 05 09:26 AM
changing default margin settngs krinneyd Excel Discussion (Misc queries) 8 January 25th 05 05:03 PM
Relationship between Book.xlt and Options? [email protected] Excel Discussion (Misc queries) 4 January 16th 05 07:40 PM
Is there a way to change the default shading color ? greg Excel Discussion (Misc queries) 5 November 30th 04 11:40 PM


All times are GMT +1. The time now is 07:15 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"