I have a macro that calls other macros that go to other tabs, look at the data, then hide some rows. I've tried putting the Application.ScreenUpdating = False command at various places in both the main macro and the macros that are called by the main macro, but no matter what I've tried, when the macro runs, the screen flicks over to those other tabs. Any thoughts? The macros are below. The UPDATEALLSHEETS macro is the first one, which calls the other ones.
Sub UpdateAllSheets()
Application.ScreenUpdating = False
Call VolumeRowUnhideHide
Call UpdateSpendingAllMfg
Application.ScreenUpdating = True
Sheets("Key Metrics").Select 'This puts the user back to the place they started.
Range("G4").Select
End Sub
Sub VolumeRowUnhideHide()
Application.ScreenUpdating = False
Dim Rwn As Long
Sheets("Volume").Select
Range("b6:b28").Select
Range("b6:b28").EntireRow.Hidden = False
For Rwn = 6 To 28
If Cells(Rwn, 3) = 0 And Cells(Rwn, 4) = 0 And Cells(Rwn, 5) = 0 Then
Cells(Rwn, 3).EntireRow.Hidden = True
End If
Next Rwn
Range("B1").Select
Application.ScreenUpdating = True
End Sub
Sub UpdateSpendingAllMfg()
Application.ScreenUpdating = False
Dim Rwn As Long
Sheets("Spending - All Mfg").Select
Range("C9:C22").Select
Range("C9:C22").EntireRow.Hidden = False
For Rwn = 9 To 22
If Cells(Rwn, 3) = 0 And Cells(Rwn, 4) = 0 And Cells(Rwn, 5) = 0 Then
Cells(Rwn, 3).EntireRow.Hidden = True
End If
Next Rwn
Range("B1").Select
Application.ScreenUpdating = True
End Sub
Bookmarks