turn off screen updating

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
841
Office Version
  1. 365
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
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
do a search through all modules for screenupdating and clear out all the ones you dont need. that will soon answer you suspision.
 
Upvote 0
do a search through all modules for screenupdating and clear out all the ones you dont need. that will soon answer you suspision.

As i say, im a bit wary of changing any of the other macro's
 
Upvote 0
i realise that, but it will answer your question. just comment them out and see what happens. you can always restore them again one by one.
 
Upvote 0
i realise that, but it will answer your question. just comment them out and see what happens. you can always restore them again one by one.

I'LL give this a go and report back the results

thanks for your time
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,761
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top