When I run the following code, I get the 'invalid procedure, call or argument - runtime error 5' message. I did not write this code - so I looked at the VBA code and noticed that it is trying to append the file name based on a specified range.
***********************
'Creates a string variable for the file path to save the with Summary page
Dim fPathA As String
fPath = "L:\DOCS\" & Range("A6") & "\" & Range("L9") & " " & Range("A5") & "(with Summary Page).pdf"
Here is the actual Macro
'Saves the with Summary Page without opening it.
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fPathA, Quality:= _
xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
When I try to run this, I get the error message mentioned above. HOWEVER, when I remove & Range("A6") & "\" - the macro runs just fine. Since these ranges are used as part of the file name, how can I rewrite this macro in order to get all of the ranges specified as part of the file name?
***********************
'Creates a string variable for the file path to save the with Summary page
Dim fPathA As String
fPath = "L:\DOCS\" & Range("A6") & "\" & Range("L9") & " " & Range("A5") & "(with Summary Page).pdf"
Here is the actual Macro
'Saves the with Summary Page without opening it.
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fPathA, Quality:= _
xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
When I try to run this, I get the error message mentioned above. HOWEVER, when I remove & Range("A6") & "\" - the macro runs just fine. Since these ranges are used as part of the file name, how can I rewrite this macro in order to get all of the ranges specified as part of the file name?