View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
MarkS MarkS is offline
external usenet poster
 
Posts: 49
Default Testing for a directory

Thanks that work just great

"Nigel" wrote:

This works for me.....

Dim sFolder As String
sFolder = "C:\NewFolder"

If Dir(sFolder, vbDirectory) = "" Then MkDir sFolder


--

Regards,
Nigel




"MarkS" wrote in message
...
Hi,
I need to test if a directory exists and if not create it. All I can think
of is to use on error and try and open it, they create a new directory if
it
fails.
Any sugestions of a more elegant way