Consulting

Results 1 to 5 of 5

Thread: Save file to a different folder, add to file name & change from .xlsm to .xlsx

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jun 2005
    Posts
    95
    Location

    Save file to a different folder, add to file name & change from .xlsm to .xlsx

    Hello everyone,

    Long time no post...

    I have a file where I am copying a range of cells, pasting and it to a new workbook. What I want to do is save that workbook in another folder with the same name as the original file with " - Mapping File" added to the new file name, then change the new file from .xlsm to .xlsx. I am so close with what I have but it's doing something wonky (yes I said wonky)!

    ActiveWorkbook.SaveAs "S:\Recruiting Information\Field Recruiters\Area Books\Mapping Files\" & fileName & " - Mapping File", FileFormat:=xlOpenXMLWorkbook
    This is doing everything I want it to do except the final file name is coming out as
    "Lake Michigan Region School List.xlsm - Mapping File" (which is not even an Excel file, probably because of " - Mapping File" after the extension)

    and it should be "Lake Michigan Region School List - Mapping File.xlsx" and a regular Excel file. Can anyone help??? Thank you in advance.
    Last edited by macropod; 01-09-2019 at 02:15 AM.

Posting Permissions

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