JohnZ1156
Board Regular
- Joined
- Apr 10, 2021
- Messages
- 180
- Office Version
- 2021
- Platform
- Windows
I'm looking for a simple solution, if there is one, for a macro to check for a folder, create it if it doesn't exist, or move on if it does exist
Here's part of what I have:
Here's part of what I have:
VBA Code:
Sub PrintPDF()
Dim ws As Worksheet
Dim vFile As Variant
Dim sFile As String
Dim LDate As Date
Dim datey As String
Dim dateym As String
datey = Format(CStr(Now), "yyyy")
dateym = Format(CStr(Now), "yyyy-mm")
MkDir "C:\Users\Name\Documents\Finance\Consolidations\" & datey & "\" & dateym
End Sub