jondavis1987
Active Member
- Joined
- Dec 31, 2015
- Messages
- 443
- Office Version
- 2019
- Platform
- Windows
I have a macro where I hide sheets "Core Report" and "Joints" pretty early. This is the end of the macro. After exporting it as a PDF i would like the sheets to be visible again. When I run this they stay hidden. I've also tried moving the sheets visible code before the End With
VBA Code:
With srcWB
fName = srcWB.Sheets("A").Range("A!F19").Value
Sheets(Array("A", "Sheet2")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\jdavis\Dropbox\Quality Control\Asphalt\Asphalt Reports\" & fName, _
openafterpublish:=True, ignoreprintareas:=False
End With
Sheets("Core Report").Visible = True
Sheets("Joints").Visible = True
End If
End Sub