Convert xla add-in to xlam?

R

Richard M

I have an add-in in xla format that I want to convert to xlam. Save-as is
unavailable in normal Excel and the VBA editor. How do I do it?
 
J

Jon Peltier

In the VB Editor, select the project's ThisWorkbook object, then change the
IsAddIn property to False. This makes the add-in workbook visible in Excel.
Switch to Excel and do Save As choosing the xlam file type.

The xla should still work (mostly, anyway) in 2007.

- Jon
 
R

Richard M

The xla does not work properly in 2007. When a spreadsheet is opened you just
see a plain blue page until the Office button is clicked. As this is an
add-in that is suppplied to a lot of clients, this will generate a lot of
support questions.

Setting ThisWorkbook.IsAddin property to false etc., enabled me to save the
addin as xlam (thanks). Then I re-registered the add-in. When I open a
workbook all the functions get renamed to Addin.xlam!function, which (I
think) means all the cells in the workbook that use that function need to be
changed.

Richard
 
J

Jon Peltier

I did a quick test with an xla and an xls that called a function in the xla.
I converted the xla to an xlam. The formulas that called the function linked
to the old file.

All you would need to change is the path to the original add-in. Install the
new add-in, open the file. You will see #NAME? errors wherever the cell
references the old add-in. do a search and replace, changing the old path to
nothing. For example, my old function was

='C:\Documents and Settings\Jon Peltier\Desktop\Hello\Hello.xla'!Hello()

I need to change this to

=Hello()

It's inconvenient, but it can be automated. For one project I wrote a
routine that detected when a file was opened, then is searched for and
deleted the old path. There was a small lag on file open, which may be
exaggerated in Excel 2007.

- Jon
 

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