I am currently using the code below to convert a cell range to a PDF file and automatically save it to a spot on a network drive with a predetermined name. How can I add a condition to this so that it only actually saves the PDF to that folder when the following conditions are met:
E8 OR E10 OR E11 OR E13 = TRUE AND E17 OR E18 OR E19 OR E20 = TRUE
Sub clicksubmit01()
Dim FileName As String
FileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5)
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
"S:\Folder Location\" & Cells(2, 2).Value & " - " & Cells(6, 2).Value & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Range("A1:D27").Select
End Sub
Bookmarks