View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Alan Alan is offline
external usenet poster
 
Posts: 188
Default Application Level macros

"modjoe23"
wrote in message
...

Thank you guys for your replies. However, my question was how to
create a macro that is universal. Maybe an example would simplify
what I'm trying to accomplish. I would like to have a button, for
example Set Autofilter On that can be run any time i use excel and
with any workbook to set the autofilter to ON. I know how to create
the menubars and all I just don't know how to the macro application
specific rather than workbook or worksheet specific. I hope this is
clearer. Thanks


Hi,

Bob's reply was the answer you are looking for.

All code must exist within a workbook in some way.

That workbook could be personal.xls (which is usually hidden by
default) or perhaps in an add-in (xla).

If you always want the button to be available, the approach is to use
one of those options with personal.xls probably being best if you want
it only available to yourself, and an add-in a better approach if you
want to distrinbute it to others.

Perhaps a better question for us to ask would be, in what way does
that not meet your requirements? Personal.xls could be used (as per
the example in Dave's post) to create a menubar button each time excel
is opened (no matter what workbook(s) are opened with the excel
application or later) that would turn on an autofilter.

HTH,

Alan.