Using XLA to load VBA program

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How do I register or expose a function (in a Visual Basic program created
with the Excel Visual Basic editor and saved as an .xla file) so that it is
visible when I try to use the Macro manager to assign and use it as a Macro?

I created the program and it runs fine from the VBA editor--I just can't get
to it once I load it via the .xla mechanism--it doesn't show up in the
selection window.
 
Thanks Dave,

I will try this. But let me understand it properly:

1) In my .xla file, where the VB program is, I add the code to create the
menu bar which is the part of the shell where you indicate "In a general
module..."
2) Then, in the file where I import the .xla file, I use the code to call
the create and remove menu functions which is the part of the shell where you
indicate "Under ThisWorkbook..."

Is this correct?
--
Thanks,
(e-mail address removed)


Dave Peterson said:
I think most would either give the users a toolbar or add icons/options to an
existing toolbar.

Here's how I create that toolbar on the fly:
http://groups.google.co.uk/[email protected]

If you want to add items to the worksheet menu bar, you can use John
Walkenbach's menumaker:
http://j-walk.com/ss/excel/tips/tip53.htm
 
I'm confused.

Did you use VBA or VB to create your addin?

If you used VBA within excel to create the procedures, then it sounds like you
understand correctly.
Thanks Dave,

I will try this. But let me understand it properly:

1) In my .xla file, where the VB program is, I add the code to create the
menu bar which is the part of the shell where you indicate "In a general
module..."
2) Then, in the file where I import the .xla file, I use the code to call
the create and remove menu functions which is the part of the shell where you
indicate "Under ThisWorkbook..."

Is this correct?
 
Dave,

It works like a champ.

Thanks,
(e-mail address removed)


Dave Peterson said:
I'm confused.

Did you use VBA or VB to create your addin?

If you used VBA within excel to create the procedures, then it sounds like you
understand correctly.
 

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

Back
Top