+ Reply to Thread
Results 1 to 7 of 7

Convert xlam to xlsm

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    27

    Convert xlam to xlsm

    Hi everybody, I have made an xlam add-in which works fine. It has a sheet ("Record") within it that records information generated by using the add-in. Is it possible to convert the xlam file back to an xlsm file so that I can edit the data in the "Record" sheet and then save it back as the original xlam file? Thanks in advance

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,104

    Re: Convert xlam to xlsm

    I don't think you need to convert it.

    There's a property IsAddIn you can change to False.

    You can access that by selecting ThisWorkbook in the Project Explorer and going to the Properties Window (F4).
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-27-2012
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Convert xlam to xlsm

    Thanks, I found that earlier and it works ok. Setting the IsAddin to False shows all the sheets in the xlam. However, if I edit the data I cannot save the file by overwriting the original, I get an error message. saving as a different xlam name and then changing it back to the original works but i don't want to do that everytime. any suggestions?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,104

    Re: Convert xlam to xlsm

    What was the problem with saving?

    I just did it using SaveAs with the original name.

    It did ask if I wanted to overwrite but that was all.

  5. #5
    Registered User
    Join Date
    09-27-2012
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Convert xlam to xlsm

    if I use Save there is a error message about not being able to use the file extension. If Save As, it prompts to overwrite the original but then doesn't. A file with a 6 digit alphanumeric name is created instead in the same folder as the original. I will try modifying the code to make the IsAddIn false, make the changes to the sheet and then make IsAddin true and see what happens. Thanks for the advice so far.

  6. #6
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,637

    Re: Convert xlam to xlsm

    Did you change the SaveAs type in the dropdown?
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,104
    What code would you be using to set IsAddIn to False?

    Why do you want to do it with code?

  8. #8
    Registered User
    Join Date
    09-27-2012
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Convert xlam to xlsm

    Thanks both. I did change the file type in the drop down. However, I've sorted the problem now. The solution is to use

    ThisWorkBook.IsAddIn = False

    to show the xlam file. Then I display another form with a command button that resets the IsAddIn to True. I can then make the changes to the Sheet as requiredand, when done, click on the command Button to close the xlam.This effectively saves the xlam file without causing the errors.
    thansk for the help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1