ChristineJ
Well-known Member
- Joined
- May 18, 2009
- Messages
- 761
- Office Version
- 365
- Platform
- 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?
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