+ Reply to Thread
Results 1 to 5 of 5

Changing default file location in Save As Macro

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Changing default file location in Save As Macro

    Hi Everyone,

    I just want to change the default view to save the file as when the user runs the macro from below.

    Ideally I would like to be able to set the save location to something like:
    Please Login or Register  to view this content.
    and the macro would use Path as the default to display as the save location when the dialogue box appears

    Here is the code i am using to run the save as
    Please Login or Register  to view this content.
    kind regards
    Last edited by jordan2322; 07-16-2012 at 01:02 AM.

  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: Changing default file location in Save As Macro

    Hello jordan2322,

    Your macro will now set the default directory to what you choose. In the code it is set to "C:\Test Folder". Change this path to what you want to use. The macro will remember the original setting and restore it before finishing.
    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
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Changing default file location in Save As Macro

    Thanks for your reply Leith.

    Im getting an error 424 Object required when running this code on line:
    CurDir = SaveToDir ' Change the default save to path.

    Whats causing this do you think?

  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: Changing default file location in Save As Macro

    Hello jordan2322,

    I thought I deleted the equal sign before posting the code. It should be...
    Please Login or Register  to view this content.
    The same holds for this line. Remove the equal sign.
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 07-15-2012 at 11:53 PM.

  5. #5
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Changing default file location in Save As Macro

    Thanks Leith! works perfect now

+ 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