Hi,
I have the below macro which works well to produce a pdf of the summary sheet. But I want to put a button on multiple sheets in the same file, so when I change things, I can hit the button where ever I am and the pdf is created. At the moment after the macro runs I end up on the summary sheet, but I want to stay on which ever sheet I am on at the time.
I have the below macro which works well to produce a pdf of the summary sheet. But I want to put a button on multiple sheets in the same file, so when I change things, I can hit the button where ever I am and the pdf is created. At the moment after the macro runs I end up on the summary sheet, but I want to stay on which ever sheet I am on at the time.
Code:
Sub Summary_Save()
'
' Summary_Save Macro
' Saves the summary page as a pdf
'
'
Sheets("Summary").Select
Dim fName As String
With ActiveSheet
fName = .Range("D1").Value
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"c:\Uncontrolled\" & fName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End With
End Sub
Last edited: