+ Reply to Thread
Results 1 to 6 of 6

Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

  1. #1
    Registered User
    Join Date
    02-12-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    58

    Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

    Hello all,

    After reading through several forums and trying this myself... I'm stuck. I am trying to create Folders with sub folders and sub sub folders!

    Each job# in column "A" should have its own folder in My Documents. For each Job folder (column "A") there should be two sub folders, "PRE CX" and "CX" (Cells B3 and D3). In the "PRE CX" sub folder there should be one folder for each cell in column C. In the CX subfolder there should be one folder for each cell in column D. All Sub folders/Sub Sub folder should have the Job# then the folder name for example "SS132 PRE CX"

    I have attached a workbook with what I'm trying to accomplish, any help would be HUGE!

    Thanks in advanced,
    Alex

    folder maker.xlsm

  2. #2
    Valued Forum Contributor
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,192

    Re: Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

    very imported : add that reference in VBA
    Please Login or Register  to view this content.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    02-12-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

    Hi bsalv,

    I have never used the Microsoft Shell Controls and Automation and I am running into a problem with the code as is. I get a Run-time error '13': type mismatch. Any help would be appreciated.

    Thanks Alex

  4. #4
    Registered User
    Join Date
    02-12-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

    Hey bsalv,

    I figured out to enable Microsoft Shell Controls and Automation but now I'm hitting a "Run-time '91': Object variable of With block variable not set" and it highlights the line
    Please Login or Register  to view this content.
    Any help would be greatly appreciated!

    Alex

  5. #5
    Registered User
    Join Date
    02-12-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

    Sorry bsalv, I guess I should stare at the code a little longer before posting, its working great. The only thing that I am running into it that it isn't naming the sub folders with job name first. Im sure there is a way to append this code to include that I'm just not sure what that is. Thank you for your continued help!

    Alex

  6. #6
    Valued Forum Contributor
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,192

    Re: Create folders and Sub folders and Sub-Sub folders from 5 columns with VBA

    something like this
    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)

Similar Threads

  1. [SOLVED] Opening folders inside of folders and pulling data from sheets present.
    By randomguy1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2013, 10:57 PM
  2. Replies: 1
    Last Post: 09-12-2013, 09:23 PM
  3. Replies: 0
    Last Post: 12-04-2012, 01:01 PM
  4. Arrange or group folders based on the assigned icons to Folders using vba
    By sanits591 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2011, 02:04 AM
  5. Create folders and move and copy files into that folders
    By vijaybharthi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-31-2010, 04:01 AM

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