Hi All,
I've written a code so that when saving a file if it does not exist the code will prompt you to create the path and then save the file (fname).
see below,
ErrorHandler:
Dim a
a = MsgBox("Location not Found. Do you want to create this location?", vbCritical + vbYesNo, "Error")
If a = vbYes Then
MkDir "F:\AEROPOSTALE\Season\" & Season & "\" & SeaYr & "\" & Category & "\" & Vndr
ActiveWorkbook.SaveAs "F:\AEROPOSTALE\Season\" & Season & "\" & SeaYr & "\" & Category & "\" & Vndr & "\" & Fname & ".xls"
Else
End
End If
The line in red is where the debug points to when I get the runtime error 76.
I've written a code so that when saving a file if it does not exist the code will prompt you to create the path and then save the file (fname).
see below,
ErrorHandler:
Dim a
a = MsgBox("Location not Found. Do you want to create this location?", vbCritical + vbYesNo, "Error")
If a = vbYes Then
MkDir "F:\AEROPOSTALE\Season\" & Season & "\" & SeaYr & "\" & Category & "\" & Vndr
ActiveWorkbook.SaveAs "F:\AEROPOSTALE\Season\" & Season & "\" & SeaYr & "\" & Category & "\" & Vndr & "\" & Fname & ".xls"
Else
End
End If
The line in red is where the debug points to when I get the runtime error 76.