I have a macro which combines a number of existing macro's is there a way of running it without the screen updating.
iVE Tried inserting the Application.ScreenUpdating = False at the top of the macro
but it doesnt work (because it runs a series of macros where this is swithced back on again i suspect) i am a bit wary of going into to the other macro's and changing them as they work fine as they are.
so i would like to just add some code into this macro which keeps the screen from flickering from the start of the process to the end. sort of overriding the command to switch it off should it occur during the process
thanks
the code is below
Private Sub Worksheet_Change(ByVal Target As Range)
AUTOFILTER_ON_DETAIL_ACTIVITY
Application.EnableEvents = False
Application.ScreenUpdating = False
UnhideSheets
Sheets("Running").Select
If Target.Address(False, False) = "B9" Then
Sheets("CATEGORIES").Select
ActiveSheet.Unprotect Password:="CORLEONE"
Sheets("DASHBOARD").Select
Select Case Target.Value
Case "P1": Call PHASEP1
Case "P2": Call PHASEP2
Case "P3": Call PHASEP3
Case "P4": Call PHASEP4
Case "P5": Call PHASEP5
Case "P6": Call PHASEP6
Case "P7": Call PHASEP7
Case "P8": Call PHASEP8
Case "ALL": Call PHASEALL
UnhideSheets
Sheets("CATEGORIES").Select
ActiveSheet.Protect Password:="CORLEONE"
Sheets("DASHBOARD").Select
HideSheets
End Select
Application.EnableEvents = True
FILTER_AREA
Sheets("DASHBOARD").Select
Range("C9").Select
End If
If Intersect(Target, Range("d9")) Is Nothing Then
Exit Sub
Else
Application.EnableEvents = False
Application.ScreenUpdating = False
Sheets("Running").Select
UnhideSheets
Sheets("CATEGORIES").Select
ActiveSheet.Unprotect Password:="CORLEONE"
Sheets("DASHBOARD").Select
AREA_SELECTION
UnhideSheets
Sheets("CATEGORIES").Select
ActiveSheet.Protect Password:="CORLEONE"
Sheets("DASHBOARD").Select
End If
If Target.Address(False, False) = "B9" Then
Select Case Target.Value
Case "ALL": Call RESTORE_BASELINE_TO_GRAPH
End Select
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
HideSheets
FILTER_AREA
Sheets("DASHBOARD").Select
Range("C9").Select
End Sub
iVE Tried inserting the Application.ScreenUpdating = False at the top of the macro
but it doesnt work (because it runs a series of macros where this is swithced back on again i suspect) i am a bit wary of going into to the other macro's and changing them as they work fine as they are.
so i would like to just add some code into this macro which keeps the screen from flickering from the start of the process to the end. sort of overriding the command to switch it off should it occur during the process
thanks
the code is below
Private Sub Worksheet_Change(ByVal Target As Range)
AUTOFILTER_ON_DETAIL_ACTIVITY
Application.EnableEvents = False
Application.ScreenUpdating = False
UnhideSheets
Sheets("Running").Select
If Target.Address(False, False) = "B9" Then
Sheets("CATEGORIES").Select
ActiveSheet.Unprotect Password:="CORLEONE"
Sheets("DASHBOARD").Select
Select Case Target.Value
Case "P1": Call PHASEP1
Case "P2": Call PHASEP2
Case "P3": Call PHASEP3
Case "P4": Call PHASEP4
Case "P5": Call PHASEP5
Case "P6": Call PHASEP6
Case "P7": Call PHASEP7
Case "P8": Call PHASEP8
Case "ALL": Call PHASEALL
UnhideSheets
Sheets("CATEGORIES").Select
ActiveSheet.Protect Password:="CORLEONE"
Sheets("DASHBOARD").Select
HideSheets
End Select
Application.EnableEvents = True
FILTER_AREA
Sheets("DASHBOARD").Select
Range("C9").Select
End If
If Intersect(Target, Range("d9")) Is Nothing Then
Exit Sub
Else
Application.EnableEvents = False
Application.ScreenUpdating = False
Sheets("Running").Select
UnhideSheets
Sheets("CATEGORIES").Select
ActiveSheet.Unprotect Password:="CORLEONE"
Sheets("DASHBOARD").Select
AREA_SELECTION
UnhideSheets
Sheets("CATEGORIES").Select
ActiveSheet.Protect Password:="CORLEONE"
Sheets("DASHBOARD").Select
End If
If Target.Address(False, False) = "B9" Then
Select Case Target.Value
Case "ALL": Call RESTORE_BASELINE_TO_GRAPH
End Select
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
HideSheets
FILTER_AREA
Sheets("DASHBOARD").Select
Range("C9").Select
End Sub