I keep my personal.xla (an addin) in my XLStart folder (and I use xl2003)..
If I start excel by clicking on the excel icon on my desktop, the addin is
loaded.
If I start excel by doubleclicking on a .xls file, the addin is loaded.
The only way I can avoid loading the addin is by starting in safe mode (or
automation mode).
This personal.xla addin located in XLStart doesn't appear in the Tools|Addins,
though.
And any addin won't show up in that tools|macro dialog. You can still type in
the full name of the sub to run, but that usually isn't feasible.
For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm
Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)
In xl2007, those toolbars and menu modifications will show up under the addins.
And if you use xl2007:
If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htmhttp://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
orhttp://
www.rondebruin.nl/2007addin.htm
--
Dave Peterson- Hide quoted text -
- Show quoted text -
Dave:
Thank you for your links, which I've saved for future reference. I
was trying to avoid adding menu bars or other VBA-code dependent
solutions, and wanted at most a button on an existing toolbar to hook
into the macro.
But it turns out the system was working correctly after all (or at
least it is now). I've got a personal.xls (name is important, case is
not) which contains the macro I wanted to be available to all
workbooks. I've put it in the xlstart folder at C:\Documents and
Settings\Administrator\Application Data\Microsoft\Excel\XLSTART.
The macros in personal.xls are loaded whether I click on an
existing .xls file, or I invoke Excel from the Start menu, the module
for personal.xls is listed in the VBA Project window, and most
importantly is available from Tools | Macro. No nag dialog is
presented asking if I want to disable the macros, which is also what I
wanted.
Now, I realize this is the way it was supposed to work all along, but
for some reason it didn't work this way yesterday night, which is why
I resorted to the .xla add-in. Maybe it was "user error", but we shall
see.
(For further diagnosis, another workbook, BOOK.XLS, is also located
in C:\Documents and Settings\Administrator\Application Data\Microsoft
\Excel\XLSTART and is NOT loading, irrespective of whether I click an
existing .xls file or invoke Excel from the Start menu. Tools|Options|
General "At startup, open all files in" text box is empty, so it
should be defaulting to this default location, I think. But who knows?
And when I start Excel from the Start menu, it opens personal.xls now
rather than book1.xls as it did before. This is getting too confusing
for me.)
-- Roy