# MkDir with cell value as folder name.

1. ## MkDir with cell value as folder name.

Hi all i need urgent help creating folders with the cell value as folder name.

I tried but did not sucseed, the folders needs to be created in a folder on my desctop.
Thanks

The File with the data is attached.

FR Catai Assets Final 23-08-2012.xlsm

2. ## Re: MkDir with cell value as folder name.

Try this

Please Login or Register  to view this content.

3. ## Re: MkDir with cell value as folder name.

Please Login or Register  to view this content.

4. ## Re: MkDir with cell value as folder name.

With the first one i recive the following error.

What did i do wrong?
Error.xlsx

5. ## Re: MkDir with cell value as folder name.

Need to change C:\to your desktop path. Or use Bobs that will get your desktop path for you.
Please Login or Register  to view this content.

Fixed
Thanks

7. ## Re: MkDir with cell value as folder name.

I now need to go a step futher, i need a folder for each month in each folder.

At the moment my macro is like this:

Please Login or Register  to view this content.
How do I need to change it now?

Thanks for the help!

FR Catai Assets Final 23-08-2012.xlsm

8. ## Re: MkDir with cell value as folder name.

Where does C:\test align to your request for the desktop?

9. ## Re: MkDir with cell value as folder name.

I just made a folder on my c drive, sorry.

10. ## Re: MkDir with cell value as folder name.

Please Login or Register  to view this content.

11. ## Re: MkDir with cell value as folder name.

Nothing happens, the macro run with no error,but nothing happens?

12. ## Re: MkDir with cell value as folder name.

Is this any better?

Please Login or Register  to view this content.

13. ## Re: MkDir with cell value as folder name.

Sorry but where will make the folders, as the test folder is still empty?

14. ## Re: MkDir with cell value as folder name.

My macro looks like this.
Please Login or Register  to view this content.

15. ## Re: MkDir with cell value as folder name.

Can anybody help me?

16. ## Re: MkDir with cell value as folder name.

@ tdo4h

Welcome to the forum.

Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
Thanks.

Also
Please notice that I have removed whole post quotes from your posts(s). Please read the following forum rule and keep it in mind for your future posts. Thanks.

Rule 12. Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.

17. ## Re: MkDir with cell value as folder name.

Please Any body, i need this to work.
Thanks

18. ## Re: MkDir with cell value as folder name.

Presumably there is an error. Remove the line that says On Error Resume Next and tell us where it errors and what the error is. Get the value of path as well, and your desktop folder.

19. ## Re: MkDir with cell value as folder name.

The Macro run with out any error, it but it did not create any folders?
Thanks

---------- Post added at 10:39 AM ---------- Previous post was at 10:38 AM ----------

The macro that Mike posted worked, now i just need to make folders in the folder, a folder per month.
Thanks

20. ## Re: MkDir with cell value as folder name.

I know that, but there is an error ignore statement, which is what I suggested that you remove and re-run.

21. ## Re: MkDir with cell value as folder name.

Thanks, the error that I recive is :Run-time error '76' Path not found

Please be patient with me, as I am new to this, and not used to the forum rule's, but will do my best to obey them.
Thanks.

22. ## Re: MkDir with cell value as folder name.

I am being patient, trust me

What was the value of path when the error arose, and what is the full value of your desktop folder (e.g. mine is C:\Users\bob\Desktop)?

23. ## Re: MkDir with cell value as folder name.

MkDir path & cell2.Value & "\" & cell.Value
My full value is C:\User\Sarel Snyman\Desktop.

Thanks

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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