Dim Confirm As String
Dim strYear As String
Dim strMOnth As String
strYear = Format(DTP.Value, "yyyy")
strMonth = FOrmat(DTP.Value, "MMMM")
'Psuedo Code -as I am not sure here what to do but something like this
' Check if a Dir exist in a Dir named 210 in Main App.Path
If Dir does Not Exist Then
Confirm = MsgBox("Do you want to create Dir for " & strYear & "?", vbQuestion + vbYesNo)
If Confirm = vbYes Then
MkDir-> strYear ' strYear Dir is a sub Dir of a Sub Dir residing in the Main App.Path as shown on next line
' Main App. Path
'210 <---This is the DIrectory the strYear directory will be created in
MakeSubDir-> strMonth ' This is Sub Dir to strYear Dir
Else
Exit Sub
End If
ElseIf Dir does Exist Then
'Check to see if strMonth Dir exist in strYear dir if not then create it
If strMonth Dir does Not Exist Then
Confirm = MsgBox(" wanna Make it blah blah", vbQuestion + vbYesNo)
If COnfirm = vbYes Then
MkDIr strMonth ' This is Sub of strYear Dir just created
Else
Exit Sub
End If
' If all is there or created then I will save files to strMonth Dir