Home > Back-end >  Application.ScreenUpdating = true does not update screen
Application.ScreenUpdating = true does not update screen

Time:07-12

I have an Excelsheet where I do some dataloading. While this, I turn of Screen Updating with:

Application.ScreenUpdating = False

After I turn it on with:

Application.ScreenUpdating = True

But the problem is, that the screen is still be freezed. This is only occuring on some customer-machines and sudden in the last few days.

When I remove the two ScreenUpdating-Lines, all is working ok.

Does someone know this phenomenon and knows a solution?

CodePudding user response:

BennoDual,

What I have tried was restarting the computer. The simplest fix, so far, is to comment out all "Application.ScreenUpdating = False" statements. Leaving the "= True" statements alone.

I'm glad it is not "just me" and, since this now a known issue, my solution is to wait, and test each day for the fix. For me this issue arose around 3:30 PM on Sunday July 10. It was working the night before and I think, even Sunday morning.

Here was my testing, after determining the issue.

After creating a new Excel workbook, cell C3 was selected, the following code was executed, and then Sheet1 was reviewed.

Double Clicked A1 and entered "aaa". Result: A1 appeared empty. Name Box showed cell A1 selected. Formula Bar showed "aaa". C3 as still outlined.

Scrolled down quite a ways and Double clicked what appeared to be A1 and entered "bbb". Result: The cell appeared empty. Name Box showed A137. Formula Bar showed "bbb".

I could then use Ctrl UpArrow and Ctrl DownArrow which jumped between A1 and A137. Both still appeared empty but the Formula Bar proved otherwise.

To effectively simulate "Application.ScreenUpdating = True" requires shutting down all currently open Excel Workbooks. Not just the one where the "= False" was executed.

Sub Testing()
   Dim booValue As Boolean

   booValue = Application.ScreenUpdating
   Debug.Print booValue    'Result is True

   Application.ScreenUpdating = False
   booValue = Application.ScreenUpdating
   Debug.Print booValue    'Result is False

   Application.ScreenUpdating = True
   booValue = Application.ScreenUpdating
   Debug.Print booValue    'Result is True
End Sub

CodePudding user response:

We have the same problem in our company, but only on couple of machines. I've noticed that the problem occurs on 32bit excels with compilation number 2206 16.0.15330.20144 At least people with this problem have this excel version. On my 64bit and 2206 16.0.15330.20216 version everything is running smooth. Could you check yours version? Maybe fix would be to force update excel or change to 64bit version.

CodePudding user response:

Good idea to pin point version info.

Mine 32-bit version is broken. Product Version 206 16.0.15330.20230

As for the suggestion to show citations to support our statements, well, I spent hours on Sunday looking for the issue. I tried again Monday night and found this post, opened 17 hours earlier.

From Stack's position, I think we have a solution which is to comment out the problematic statement until Microsoft provides a fix.

  • Related