Hi, I have made a spreadsheet that includes several navigational buttons as well as a button that turns certain regions of the spreadsheet into a PDF. I have noticed that after the use of the "PDF Button", the other buttons will suddenly start to operate slowly, and will change size very strangely (even though they are set to not change size or move with cells). I am thinking it has something to do with the code that I am using. I was wondering if anyone could provide some insight as to why this is happening. The PDF Buttons code is below as well as the images of how the other buttons are supposed to look & what happens to them as they shrink. Thanks in advance, for any help.
Sub PrintPDF()
Dim MyPath
Dim MyFolder
Sheets("Summary").Move Before:=Sheets(1)
Sheets("Breakdown").Move Before:=Sheets(2)
Sheets("Entry").Move Before:=Sheets(3)
Sheets(Array("Entry", "Breakdown", "Summary")).Select
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.Zoom = False
.FitToPagesWide = 1
.CenterHorizontally = True
.CenterVertically = True
.BottomMargin = 0
.TopMargin = 0
.RightMargin = 0
.LeftMargin = 0
End With
MyPath = ThisWorkbook.Path
MyFolder = Application.GetSaveAsFilename(MyPath, "PDF Files (*.pdf),*.pdf")
If MyFolder = False Then Exit Sub
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=MyFolder, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheets("Entry").Move Before:=Sheets(1)
Sheets("Breakdown").Move Before:=Sheets(2)
Sheets("Summary").Move Before:=Sheets(3)
Sheets("Entry").Select
End Sub
Bookmarks