• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Create folder & sub folder

Abhijeet

Active Member
Hi

folder path, folder name & sub folder name mention in sheet 1 then how to create folder & sub folder with help of VBA please tell me how to do this
 

Hi !

As you can read everywhere with a single search …
For example see in VBA inner help MkDir statement …
 
yes i read this MkDir but how to create subfolder in attach video like this i want to create macro so please tell me how to do this
 

Just create each level of folder : main folder, sub folder, sub sub folder …

And see samples over the Web !
 
Thanks for replay
Only one thing please tell me i have this path long to mention in macro its very time taken in cell A13 mention path create all folders & sub folders please tell me
 

Attachments

  • CreateFolders.xls
    71 KB · Views: 11
Hi Abhijeet,

Your input style is correct. While inputting information, the code tries to validate certain information like drive letter.

If you want to avoid the checks while inputting then close the workbook and re-open it. Do not enable macros. This way you can avoid the checking.
 
no checking is ok i want if i mention direct path in A13 cell then create folders & subfolder as per name mention in cells i want to avoid each folder name mention in cells i want to mention this path in A13 cell
C:\Users\swami\Desktop\Test\New folder
 
That's not possible with the current code and I don't have time to alter it either.

If this("C:\Users\swami\Desktop\Test\New folder") is going to be the main directory path then you need to do this only once and then keep adding the directories and sub-directories you wish below in the manner you have just done.
 
Back
Top