How do I create a new XLA Add-In from an old one?

D

Dennis

I created an XLA add-in called say myStuff.XLA.

I wanted to use most of the myStuff modules, and ThisWorkBook code in a new xla
add-in.

I copied myStuff.xla to myNewStuff.xla. I clicked on Tools->Add-Ins->Browse and
clicked on the myNewStuff.xla. The Add-Ins available Box showed the old name
myStuff.xla. I brought up myNewStuff.xla in the Excel Visual Basic page and
changed the name in the Project Properties window to myNewStuff. I changed the
Form to a new Form name and changed the form label and text boxes to accommodate
the new project.

Everything compiled ok and was saved. I unchecked the Add-Ins Box and closed
Excel.

When I brought up Excel and went to Tools->Add-Ins->Browse and clicked on
myNewStuff.xla, Excel showed the old name myStuff xla line in the Add-Ins
available box instead of the new name myNewStuff.

I did a hex editor search on myNewStuff.xla and the name myStuff is still in the
xla along with the old form name and some old module names that were deleted or
changed in myNewStuff.xla.

What did I do wrong? How can I get the myNewStuff line to appear in the Add-Ins
available box? What is the proper way to import old xla project code into a new
project xla? Btw I didn't see any menu items in the Excel VBA to create new xla
projects. Where is that menu item?

Thanks for any help you can give me.

Dennis
 
M

Myrna Larson

I think I have these steps correct. If not, someone else will step in with a
correction.

With your new add-in installed, in the VB Editor window, open it in the
project pane and click on the ThisWorkbook module. Change the property IsAddIn
to False.

Then go back to Excel proper, select the add-in's window, then
File/Properties, and on the Summary tab, correct the Title (that's what is
displayed in the list of available add-ins).

Then go back to the VB Editor, change it back to an add-in and resave it.
 
D

Dennis

Thanks Myrna I'll try your method.

Unfortunately, I did it the hard way before I read your message.

The Hard Way:
I loaded the myNewStuff.xla module in the tools>Add-ins>browse box. Of course
it had the wrong old myStuff label.

I saved a Workbook with a blank sheet1 with a save As to an xla file named
myNewStuff2.xla. I closed Excel and reopened Excel and loaded myNewStuff2,xla
from the Tools>Add-ins>browse menu.

In The VBE, the VBA Projects myNewStuff and myNewStuff2 were visible.
myNewStuff2 was empty. In myNewStuff I exported the ThisWorkBook, myNewStuff
frm and myNewStuff modules. In myNewStuff2 I imported all these exports into
their corresponding slots. I compiled, saved and myNewStuff2 now runs
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

Top