Thread
:
Testing for a directory
View Single Post
#
4
Posted to microsoft.public.excel.programming
MarkS
external usenet poster
Posts: 49
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
Reply With Quote
MarkS
View Public Profile
Find all posts by MarkS