+ Reply to Thread
Results 1 to 5 of 5

Save a file to a folder, create folder if it doesn't exist

  1. #1
    Forum Contributor mcinnes01's Avatar
    Join Date
    05-25-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    449

    Save a file to a folder, create folder if it doesn't exist

    Hi,

    I have a macro that makes a file, names it and saves it to your desktop, however I want it to save the files in a folder on your desktop and if the folder doesn't exist it will create one.

    This is my code that saves and name the file to your desktop.

    Please Login or Register  to view this content.
    Last edited by mcinnes01; 11-01-2010 at 09:13 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Save a file to a folder, create folder if it doesn't exist

    Something like this:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor mcinnes01's Avatar
    Join Date
    05-25-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    449

    Re: Save a file to a folder, create folder if it doesn't exist

    Hi,

    Thanks it almost works, it created the folder, but saved the file on the desktop

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Save a file to a folder, create folder if it doesn't exist

    Sorry - missed a path separator:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor mcinnes01's Avatar
    Join Date
    05-25-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    449

    Re: Save a file to a folder, create folder if it doesn't exist

    mega! works a treat 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