+ Reply to Thread
Results 1 to 3 of 3

Save As Macro

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    2

    Save As Macro

    Hello,

    I am trying to create a macro that when run, saves the file in a directory as whatever text is in a certain cell (let's say cell A1). I have searched this forum and found this solution:

    ------------------------------------------------------------------------------------------------------
    Please Login or Register  to view this content.
    -------------------------------------------------------------------

    While this worked when I tested it with just a blank excel file (with "test" written in A1), whenever I try to use it on the excel workbooks I have different macros on, the file type it saves as is not recognized. The file type is literally just File.

    I am unsure why this is happening. What I currently have in Cell A1 is "=CONCATENATE(A38," ","(",B38,")")." Could the fact that this is a formula and not just text be why it is not saving as an excel file?

    Any help would be greatly appreciated, I am new to this forum but it seems like everyone on here is quite knowledgeable. Thanks in advance!


    Moderator's Note: You have to use code tags around your codes. Thank you.
    Last edited by vlady; 11-07-2012 at 09:03 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Save As Macro

    Try this to save as a macro enabled workbook

    ThisWorkbook.SaveAs Filename:=FPath & "\" & FName & ".xlsm", FileFormat:=52

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Save As Macro

    AlphaFrog, Thank you so much! That worked perfectly!

+ 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