+ Reply to Thread
Results 1 to 5 of 5

SaveAs to same directory but different file name

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    90

    SaveAs to same directory but different file name

    By Code I am trying to SaveAs the present Workbook :

    Only in the same directory as the present Workbook- but with a different file name .

    The new file name would be :
    "the Filename of the Active Workbook" + " ("D9") of the Sheet("ADMIN")"

    This macro will only be run from the Sheet("Admin").

    Any help or point me in the right direction will be appreaciated
    Last edited by johnnywinter; 02-04-2009 at 02:43 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: SaveAs to same directory but different file name

    Hello johnnywinter,

    If you are trying to create a path you can use with the SaveAs you can do this...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-21-2007
    Posts
    90

    Re: SaveAs to same directory but different file name Not change Workbook name

    Leith,

    Another great solution, but I did not think out the final result.

    Code works great to SaveAs, BUT it also changes the Active Workbook name to the filename that was saved as.

    How can I keep the open workbook with the same name And do the Save As in the following code?


    Please Login or Register  to view this content.
    Last edited by johnnywinter; 02-04-2009 at 01:24 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: SaveAs to same directory but different file name

    Hello johnnywinter,

    Let's try this method...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-21-2007
    Posts
    90

    Re: SaveAs to same directory but different file name

    Works perfectly.

    I am learning so much for you and this site. Biggest thing I have learned is that I have so much to learn.

    Thanks,

+ 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