How do I get my macros from an XLA file to show in Tools > Macro

M

MikeS

I've created an XLA file that I plan on sharing with co-workers (it
will be on the network)

I have put some Sub macro code in the XLA and saved them.

But those macros don't show up when I go to Tools > Macro

What is the "best practice" when it comes to this?

I've read about creating a toolbar in the XLA. Is this what I need to
do?
 
S

smartin

MikeS said:
I've created an XLA file that I plan on sharing with co-workers (it
will be on the network)

I have put some Sub macro code in the XLA and saved them.

But those macros don't show up when I go to Tools > Macro

What is the "best practice" when it comes to this?

I've read about creating a toolbar in the XLA. Is this what I need to
do?

Not sure about best practice, but to run a sub in an add-in you have to
type

'NameOfAddIn'!NameOfSub

in the run macro dialog. (The quotes are not necessary if NameOfAddIn
does not contain spaces.)

Unfortunately Excel isn't very helpful here and will not reveal
choices--you have to know the name of the sub. This is where having
toolbar buttons is convenient, set up the macro calls once and forget it.
 
H

Harlan Grove

MikeS said:
I've created an XLA file that I plan on sharing with co-workers (it
will be on the network)

I have put some Sub macro code in the XLA and saved them.

But those macros don't show up when I go to Tools > Macro

What is the "best practice" when it comes to this?

I've read about creating a toolbar in the XLA.  Is this what I need to
do?

Your options are adding a custom toolbar or adding a submenu under the
Tools menu in the worksheet menu bar. Usually best to add a custom
toolbar. I guess the reason Excel doesn't make Subs in add-ins visible
is because the Excel developers believe that if you know enough to
write XLAs, you should know how to create toolbars as well.
 

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