Add a sub folder

F

Fan924

I want to use a macro to add a sub directory. Hod do I check to verify
that it does not already exist before adding directory? TIA
 
H

Harald Staff

Fan924 said:
I want to use a macro to add a sub directory. Hod do I check to verify
that it does not already exist before adding directory? TIA

You could use Dir for that. But you don't have to, MkDir will err and create
nothing if the folder already exists. Just allow it to:

On Error Resume Next
MkDir ("C:\Temp")

HTH. Best wishes Harald
 
Top