View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff[_2_] Harald Staff[_2_] is offline
external usenet poster
 
Posts: 449
Default Add a sub folder

"Fan924" wrote in message
...
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