Last active
August 29, 2015 14:19
-
-
Save brazilnut2000/93ed4b348bc55c8d9f43 to your computer and use it in GitHub Desktop.
VBA: Creates a directory if it doesn't exist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub TestCreateDirIfNeeded() | |
Dim path As String | |
path = "C:\imarealboy" | |
CreateDirIfNeeded (path) | |
End Sub | |
Sub CreateDirIfNeeded(path As String) | |
On Error Resume Next | |
MkDir path | |
On Error GoTo 0 | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment