View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jan Nademlejnsky[_3_] Jan Nademlejnsky[_3_] is offline
external usenet poster
 
Posts: 2
Default How to bypass MkDir when that Dir exists already

I found it:

Sub DirectoryExists()
FPath = Range("B2")
If Dir(FPath) = "" Then '.....If
Dir("C:\Users\Owner\Documents\ExcelF\") = "" Then
MsgBox "It does not exists"
Else
MsgBox "It is already there"
End If
End Sub


"Jan Nademlejnsky" wrote in message
...
I have macro which creates Subdirectories. I need to bypass MkDir command
if that folder already exists. How do you do that?

Thanks for your help.

Jan