shankar
02-02-2010, 06:16 AM
I am developing an add-in file in Excel 2007 and I periodically want to save it under a different name after making changes.
However, the command
ThisWorkbook.SaveAs Newname, fileformat:=xlAddin doesn't seem to work.
When I typea Msgbox ThisWorkbook.Fileformat for the currently loaded add-in, it prints 51 although xlAddIn is 18.
I tried both fileformat:=51 and 56, but even though I am able to create a .xlam file, when I try to read it, Excel gives an error saying that it has an invalid extension.
How do I modify an add-in and then save it to a different name from within VBA? I am not able to do it from the editor either. Thanks.
Shankar
However, the command
ThisWorkbook.SaveAs Newname, fileformat:=xlAddin doesn't seem to work.
When I typea Msgbox ThisWorkbook.Fileformat for the currently loaded add-in, it prints 51 although xlAddIn is 18.
I tried both fileformat:=51 and 56, but even though I am able to create a .xlam file, when I try to read it, Excel gives an error saying that it has an invalid extension.
How do I modify an add-in and then save it to a different name from within VBA? I am not able to do it from the editor either. Thanks.
Shankar