PDA

View Full Version : Check if Directory Exists



Danny_Donut
11-17-2017, 06:50 AM
Hello everyone,

I'm relatively new to VBA but I really love it.
I am looking for a way to let excel check if a directory excists and if not, create it.
I find the comments in here very helpfull but i cant work out how to use a generated path.

I use the concatenate formula to generate the path and directory name in colom A (for example).
This path and directory is different in every row and i would like VBA to use this data te check if it excists and if not, create it.

Would this be possible?

Thnx in advance!

Danny

Bob Phillips
11-17-2017, 11:29 AM
I don't bother checking, just create it with an error wrap



On Error Resume Next
For i = 2 To 10
MkDir Cells(i, "A").Value
Next i
On Error Goto