Results 1 to 4 of 4

how to save .xlsm fie as .xlsx

Threaded View

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    15

    how to save .xlsm fie as .xlsx

    Hi,

    I am trying to save a workbook after macro has run as .xlsx so that same file can be sent to users without macro, but if I use below code it throws error
    [code]
    Dim ThisFile As String
    ThisFile = "Regulatory Reporting " & Format(Range("G21").Value, "dd.MMM") & ".xlsx"
    MsgBox ThisFile
    ActiveWorkbook.SaveAs Filename:=ThisFile
    [\code]

    and if changed as below (.xlsm) then it works without any trouble

    [code]
    Dim ThisFile As String
    ThisFile = "Regulatory Reporting " & Format(Range("G21").Value, "dd.MMM") & ".xlsm"
    MsgBox ThisFile
    ActiveWorkbook.SaveAs Filename:=ThisFile
    [\code]

    Any Idea how can I change the file type ?
    Last edited by Blue_kul; 01-04-2012 at 10:38 PM.

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