Running into a problem here. I need a macro to save as a pdf using the cell A2 as part of the name, so if a2=Hospice of Atlanta the same file would be Hospice of Atlanta Survey.pdf.
Here is what I have so far. the code keeps failing somewhere and I am not sure why.
any assistance would be most helpfulCode:Sub Button279_Click()Dim Wb As Workbook Sheets("Site Survey").Copy Set Wb = ActiveWorkbook s_dir = "C:\dump" ActiveWorksheet.SaveAs Filename:="c:\dump" & Range("A2").Value Wb.ExportAsFixedFormat _ Type:=xlTypePDF, _ Filename:=Mypath, _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=True Wb.Close False ActiveWorkbook.Close False MsgBox "Fact Sheet for " & Range("A2") & ".pdf saved in UHSFS2\Common\helpdesk\remote tech Surveys" End Sub



Reply With Quote
Bookmarks