I use this code to split the screen and set the starting point of the cells that I want to appear on each side. Is there a way for me to add code to prevent the user from minimizing or closing either of the two windows? (The minimize, maximize, and close icons appear at the top right of each window.) There is an EXIT button on the screen that I have that I want them to use instead to close.
Sub SplitAny(Show3 As Range, Show4 As Range)
Application.ScreenUpdating = False
Dim wd As Double, ht As Double
wd = Application.UsableWidth
ht = Application.UsableHeight
With ActiveWindow
.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
Application.ScreenUpdating = True
End Sub
Bookmarks