hi everyone i have to bit of code that is action after workbook is saved code is shown below have problem getting to run together any ideas to put this together hope you all understand thanks in advance
1st macro save active sheet to pdf
2nd macro saves entire workbook to pdf
cheers
shane
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Dim Filename As String
Dim Filepath As String
Filepath = "C:\Users\Shane\Documents\"
Filename = Filepath & "monthly" 'ThisWorkbook.Name
If Success Then
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Filename, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End If
End Sub
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Dim Filename As String
Dim Filepath As String
Filepath = "C:\Users\Shane\Documents\"
Filename = Filepath & "YTD" 'ThisWorkbook.Name
If Success Then
ThisWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Filename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=True, _
OpenAfterPublish:=False
End If
End Sub
i have also post this http://www.mrexcel.com/forum/excel-q...ml#post3550338
Bookmarks