The issue I am having isn't huge, but it will confuse my team leaders when they need to run this workbook.
I am using ScreenUpdating in a few print option macros, and the macros work fine, but when I turn ScreenUpdating back on, it changes the worksheet to a different one. All 3 macros, even the one that does not reference the sheet they land on, revert back to Sheet25 (Aka P3.5 Shift Notes) after printing, even though the macro buttons live on Sheet30 (PRINT ME).
Sub PrintAll_Update()
Application.ScreenUpdating = False
Sheet25.AutoFilterMode = False
Sheet25.Range("M3:M105").EntireRow.AutoFit
Sheet25.Range("O3:o105").AutoFilter 1, "1", , , False
Sheet26.AutoFilterMode = False
Sheet26.Range("M4:M69").EntireRow.AutoFit
Sheet26.Range("AG4:AG69").AutoFilter 1, "1", , , False
Sheets(Array("P3.5 Shift Notes", "TH Board Summary")).PrintOut
Sheets(Array("P4 Shift Notes")).PrintOut
Application.ScreenUpdating = True
End Sub
Sub PrintPIM_Update()
Application.ScreenUpdating = False
Sheet25.AutoFilterMode = False
Sheet25.Range("M3:M105").EntireRow.AutoFit
Sheet25.Range("O3:o105").AutoFilter 1, "1", , , False
Sheets(Array("P3.5 Shift Notes", "TH Board Summary")).PrintOut
Application.ScreenUpdating = True
End Sub
Sub PrintASY_Update()
Application.ScreenUpdating = False
Sheet26.AutoFilterMode = False
Sheet26.Range("M4:M69").EntireRow.AutoFit
Sheet26.Range("AG4:AG69").AutoFilter 1, "1", , , False
Sheets(Array("P4 Shift Notes", "TH Board Summary")).PrintOut
Application.ScreenUpdating = True
End Sub
All they do is filter for lines with data in them on the notes sheets and then print them. The stack of printed reports on my desk tells me that the macros function. I just cannot for the life of me figure out why it insists on returning to Sheet25 when the ScreenUpdating is turned back on.
Bookmarks