saveas addin from VBA

D

Dave Ring

I have a complex addin that I modify frequently. I'd like to be able to
make changes while using it, and then directly save a modified addin.
I've successfully written VBA code that turns the modified addin into a
workbook, and I can save that workbook, reopen it, and then save it as
an addin. But if I try the shortcut of saving the workbook directly to
an addin using Workbook.SaveAs FileName := S FileFormat := xlAddin, the
file saved is always a workbook, not an addin, regardless of whether
filename S includes a .xla extension.

This is in Excel 2001 on a Mac running OS 10.3.3.

Any ideas?

Thanks,

Dave Ring
 
J

Jim Rech

I'd like to be able to make changes while using it, and then directly save
Just save it from the VBE - click the Save toolbutton while the add-in is
the active project. No need to save it as a workbook first.

--
Jim Rech
Excel MVP
|I have a complex addin that I modify frequently. I'd like to be able to
| make changes while using it, and then directly save a modified addin.
| I've successfully written VBA code that turns the modified addin into a
| workbook, and I can save that workbook, reopen it, and then save it as
| an addin. But if I try the shortcut of saving the workbook directly to
| an addin using Workbook.SaveAs FileName := S FileFormat := xlAddin, the
| file saved is always a workbook, not an addin, regardless of whether
| filename S includes a .xla extension.
|
| This is in Excel 2001 on a Mac running OS 10.3.3.
|
| Any ideas?
|
| Thanks,
|
| Dave Ring
|
 
D

Dave Ring

Thanks. Didn't realize it could be that simple. But any guess why my
SaveAs addin in VBA doesn't?

Dave
 
K

kir999

Hello Dave,

ThisWorkbook.IsAddin = True (before ThisWorkbook.SaveAs)
does the job ...

You can read more at:

http://tinyurl.com/4yl33

It's an another approach, I haven't tried it, seems to be used for th
older versions of Office.

Good Luck,
Kiril
 

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