I have tried your code as you entered it and it worked great. However, after I entered my directory it says path not found. When I enter "debug mode" and hold my cursor over strDir, the tool tip shows the path just as I want to see it. I am wanting to write these files directly to the server....could this be the problem?
My code is as follows:
Code:
Sub ChkCreateFolder()
Dim strDir As String
strDir = "\\Cjdata1\design engineering common\Molds\" & Sheet2.Range("O1").value & "\" & Sheet1.Range("J4").Value & "\Router\"
If Dir(strDir, vbDirectory) = "" Then
MkDir strDir
Else
MsgBox strDir & " already exists. "
End If
End Sub
where
Sheet2.Range("O1").value is an existing folder &
Sheet1.Range("J4").Value is an existing folder[/code]
The tooltip ends up reading
"Cjdata1\design engineering common\molds\2000-2099\2030\Router\" which is exactly what I want.
Thank you