I may have figured it out. The "Location" string was pulling from a dynamic range that sometimes contained ":" or "\" or other offending characters. I've removed these characters from the range and it seems to be working. My code is below:
Sub SaveClear_Form()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Field Application Sheet")
'Set print area
ws.PageSetup.PrintArea = ws.Range("$G$9:$O$41")
'Delcare variables to get values from form
Dim appName As String
Dim appLoc As String
Dim appWO As String
Dim appDate As Date
Dim appTime As Date
'Get values from form to generate file name
appName = ws.Range("$H$9").value
appLoc = ws.Range("$H$13").value
appWO = ws.Range("$L$10").value
appDate = ws.Range("$G$35").value
appTime = ws.Range("$H$35").value
'Delcare file name variable
Dim pdfName As String
'Generate pdfName
pdfName = "ChemApp_" & appName & "_" & appLoc & "_" & appWO & "_Date_" & Format(appDate, "m_d_yyyy") & "_Time_" & Format(appTime, "h_mm_AM/PM") & ".pdf"
'Get file path of workbook and append with folder name for pdf records
Dim path As String
path = wb.path & "\Chemical Application Records\"
ws.ExportAsFixedFormat Type:=xlTypePDF, Filename:=path & pdfName, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
If it works on my coworkers computer I will mark this as solved.
Bookmarks