+ Reply to Thread
Results 1 to 4 of 4

Creating a Folder and Populating it

  1. #1
    Registered User
    Join Date
    08-18-2008
    Location
    Los Angeles
    Posts
    44

    Creating a Folder and Populating it

    Hi!. I am using a excel 97 and have a macro that generated hundreds of work books on a single run. Due to the extensive number of work books, i would like to save all of this into a single folder. I able to create a folder on my macro by using the "MKDIR" command, however I can not seem to save any of my workbooks on that newly created folder, do i have to release that folder first. I get a message saying "Miscrosoft Office Excel cannot access the file (Folder).

    The command i am using to save the files:
    ActiveWorkbook.SaveAs Filename:=Output_Name, _
    FileFormat:=xlNormal

    The Output_Name contains the full path including the new folder name and the workbook name.
    What do you think i am doing wrong or not doing at all?
    Last edited by teachMeExcel; 05-07-2009 at 10:56 AM. Reason: ressolved

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Creating a Folder and Populating it

    Have you checked in Explorer that the folder is correctly named and in the correct location? Try putting a debug on the Output_Name variable and checking that the path is identical to that given to you by Explorer

  3. #3
    Registered User
    Join Date
    08-18-2008
    Location
    Los Angeles
    Posts
    44

    Re: Creating a Folder and Populating it

    Mallycat, Thanks for the advise. OFcourse it was a User Error.
    Problem SOLVED.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating a Folder and Populating it

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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