+ Reply to Thread
Results 1 to 6 of 6

SaveAs alert when change xlsm to xlsx

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    3

    SaveAs alert when change xlsm to xlsx

    Hi all.

    So I am very new to VBA/Macros most of my programming experience is in scripting languages like python. I have looked at previous post but nothings seems to solve my problem.

    I am currently setting up an excel sheet that contains a fair amount of macros as to guide end-users when the sheet is filled in. Finally I want the sheet to be saved as a normal xlsx by the click of a bottom on the sheet.

    I have a macros button that points to this :

    Please Login or Register  to view this content.
    This works but it still results in an alert that when saving as xlsx that macros will be removed. I was under the impression that Application.DisplayAlerts = False would disable the alerts and the SaveAs would just "happen"

    Help would be appreciated

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: SaveAs alert when change xlsm to xlsx

    You might be better creating a new workbook and copying the sheets from your macro workbook across to this and saving the new workbook as the XLSX.
    Martin

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: SaveAs alert when change xlsm to xlsx

    One more thing..

    FileFormat:=52
    is used to Open XML Workbook Macro Enabled
    You may try FileFormat:=-4143
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Registered User
    Join Date
    07-10-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: SaveAs alert when change xlsm to xlsx

    Hi Altair,

    Use this code, I hope it might help you

    Sub SaveAsAndClose()

    ActiveWorkbook.SaveAs "finaloutput.xlsx"
    ActiveWorkbook.Close

    End Sub

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: SaveAs alert when change xlsm to xlsx

    Thanks for the replies.

    Mrice I have tried your suggestions with copy the sheet to new workbook but its seems to be copying the macros with? Any suggestions on how I can copy the entire sheet without the macros? I might mentioned that the sheet contains formatting (colors etc. I will like to have copy as well)

    Thanks

  6. #6
    Registered User
    Join Date
    07-10-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: SaveAs alert when change xlsm to xlsx

    This is what I did in the end and it worked for me....

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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