Application.ScreenUpdating issue

ChristineJ

Well-known Member
Joined
May 18, 2009
Messages
761
Office Version
  1. 365
Platform
  1. Windows
I have been using the code below very effectively for years on Excel 2010, Windows 7. I now have Excel 2013, Windows 8.1 on my new machine and the Application.ScreenUpdating = False does not seem to be effective in that there is a lot of flashing and you can see the screens splitting and unsplitting and the desktop behind them as it is happening. In Excel 2010 Windows7 the only visual change was the content on the split screens, but you did not see the "splitting" each time. I have Windows 7 Office 13 at work and Application.ScreenUpdating = False seems to be effective, so I am wondering if it is Windows 8.

In my search I found this comment at Application.Screenupdating = False Not Working In Workbooks().Activate In Windows 8
"I found the problem. Windows 8 treats changing instances diferently than Windows 7 and XP. Office 2010 require different file open to create different instances. It's native mode was open in the same instance. Office 2013 forces each workbook into it's own instance. However Windows 8 treats switching instances diferently. Windows 8 ignores the screenupdating = false when it goes between instances. How do I force office 2013 to start a workbook in the current instance?"

Is there a way to adjust the code to stop the flashing in Windows 8?

Code:
Sub ViewA()
Application.ScreenUpdating = False
    
    Range("51:71").EntireRow.Hidden = True
    Range("3:3,6:9,78:400,654:657,675:688").EntireRow.Hidden = False
    Range("BK:BK,BR:BU").EntireColumn.Hidden = True
    Range("AS:BA").EntireColumn.Hidden = False
        Call SplitAny(Range("AZ655"), Range("L3"))
End Sub
Sub ViewB()
Application.ScreenUpdating = False
    Range("3:3,6:9,51:71,78:400,654:657,675:688").EntireRow.Hidden = True
    Range("BK:BK,BR:BU").EntireColumn.Hidden = False
    Range("AS:BA").EntireColumn.Hidden = True
    Range("9:9,78:400,661:663,672:924").EntireRow.Hidden = False
    Call SplitAny(Range("L9"), Range("BJ654"))
End Sub


Sub SplitAny(Show3 As Range, Show4 As Range)
    Application.ScreenUpdating = False
    
    Dim wd As Double, ht As Double


    With ActiveWindow
        .WindowState = xlMaximized
        wd = Application.Width
        ht = Application.Height
        .WindowState = xlNormal
        .Left = 0
        .Top = 0
        .Width = wd * 1 / 2
        .Height = ht
        Application.Goto Show3, Scroll:=True
    End With
    
    With ActiveWindow.NewWindow
        .Left = wd * 1 / 2
        .Top = 0
        .Width = wd * 1 / 2
        .Height = ht
        Application.Goto Show4, Scroll:=True
    End With


    Range("A1").Select
    Application.ScreenUpdating = True


End Sub
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
ChristineJ,

If I understand what your macros are doing:

Try removing the following line of code from your SplitAny(Show3 As Range, Show4 As Range) macro:

Application.ScreenUpdating = True
 
Upvote 0
Tried that, but no change. I am now sitting at two computers, both with Excel 2013. The Windows 7 machine runs the macros with no flickering; the Windows 8.1 does not.
 
Upvote 0
ChristineJ,

Click on the Reply to Thread button, and just put the word BUMP in the thread. Then, click on the Post Quick Reply button, and someone else will assist you.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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