Screenupdating Still Updates...

jswhip

Board Regular
Joined
Jan 19, 2005
Messages
62
I have used the following code numerous times and it works as advertised (Excel doesn't update until enabled):

Application.ScreenUpdating = False
Application.Calculation = xlManual
Application.DisplayAlerts = False

However, I've run into a situation where the screen still updates even after setting ScreenUpdating = False.

Any hints on what to look for?
 

Dryver14

Well-known Member
Joined
Mar 22, 2010
Messages
2,396
what other code is there,

You may need to move the application.screenupdating further up the macro
 

jswhip

Board Regular
Joined
Jan 19, 2005
Messages
62
I've isolated to the point where the screen starts updating. Unfortunately, I'm not sure why the code starts updating again (end of attached code):

Sub CMBSSurveillance()

frmStatus.Show vbModeless

Application.ScreenUpdating = False
Application.Calculation = xlManual
Application.DisplayAlerts = False
Application.EnableEvents = False

For Each wksht In ActiveWorkbook.Worksheets

If wksht.Name = "CMBSConduitHoldings" Or _
wksht.Name = "Rating Graphs" Then
Sheets(wksht.Name).Delete
End If

Next wksht

Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Name = "CMBSConduitHoldings"

Worksheets("_1010q_CMBSSurveillance").Activate
Call runactiveqsheet(True)

FormatCMBSSurveillance

frmStatus.Hide

Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
Application.DisplayAlerts = True
Application.EnableEvents = True

End Sub

Sub FormatCMBSSurveillance()

Worksheets("CMBSConduitHoldings").Activate
Dim LastCellRow As Double

Columns("B:B").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
 

Dryver14

Well-known Member
Joined
Mar 22, 2010
Messages
2,396
my understaning of aplication.screenupdating is that it resets to true at the ed of a macro anyway so leave it out and just put false at the very beginning of the macro
also you call another macro during this one amybe you need to put the application.screenupdating in that macro too
 

jswhip

Board Regular
Joined
Jan 19, 2005
Messages
62
Thanks for the feedback.

The call to one macro is an add-in, thus I can't turn off the screen updating inside it. I commented out the code to the external add in, yet I still see the screen updating.

I've tried experimenting with making the sheet not visible, but then the calculations don't work.

Is there a property that I can display where I can verify that the screenupdating value?
 

Dryver14

Well-known Member
Joined
Mar 22, 2010
Messages
2,396
The sub you call
FormatCMBSSurveilance

seems to be right underneath the macro you are running
 

Forum statistics

Threads
1,082,438
Messages
5,365,531
Members
400,837
Latest member
ELMST616

Some videos you may like

This Week's Hot Topics

Top