Hey all!
Having trouble with some code to make a directory. My goal is to have a button on a page that creates a directory using the value of a cell, and returns an alert if the folder already exists. Here's what I have so far. I'm not getting any error messages, but the directory isn't being created either.
Sub Macro1()
'
' Macro1 Macro
' Creates Directory
'
Dim NewFolder As String
NewFolder = "C:\temp\records\" & Range("C13")
If Len(Dir(NewFolder)) = 0 Then
MkDir NewFolder
Else
MsgBox "Folder Already Exists!"
End If
'
End Sub
Edit: Okay, I think I got it. Thanks all!
Bookmarks