Reference:
Check for folder; create if it does not exist
Sub TestForDir()
Dim strDir As String
strDir = "C:\My Documents\TestDir\"
If Dir(strDir, vbDirectory) = "" Then
MkDir strDir
Else
MsgBox "Directory exists."
End If
End Sub
沒有留言:
張貼留言