+ Reply to Thread
Results 1 to 4 of 4

Macro To Save Worksheet into same directory as workbook

  1. #1
    Registered User
    Join Date
    02-25-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    79

    Macro To Save Worksheet into same directory as workbook

    Hi

    Could someone help me with this?

    I am trying to write a macro that will save my active work sheet in to a folder called Saved Files in the same directory that my work book is. I can just use the C:/ but the file is on a server and every one that uses it may have a different path.

    I have a code but I can’t seem to get it to work, I also have to add the active sheet name to this code, would it be possible to have a code that will save the active sheet using that sheet name into a folder called Saved Files in the same directory?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro To Save Worksheet into same directory as workbook

    Hi SilverFox
    What part doesnt work

    maybe you need to check for then create a folder?
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    02-25-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    79

    Re: Macro To Save Worksheet into same directory as workbook

    Hi

    I have got this code working

    Please Login or Register  to view this content.
    What this code is doing is saving my worksheet called Order Form into the same directory i am working in. What i need is to change this code so it saves it into a folder called "Saved Files" in the same directory. Also if it can be done i would like a macro that would save the file as the worksheet name instead of me having to put that in as in Order Form.

    Thanks

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro To Save Worksheet into same directory as workbook

    SilverFox
    Please Login or Register  to view this content.
    but have you created or checked to see if the folder exists
    Please Login or Register  to view this content.

+ 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