Update:
Haven't come across a solution so far, so in the meantime I've added a bit of code to exit the sub if the workbook name is changed:
Sub SplitView()
' vertically splits view
Dim wb1 As Workbook
Set wb1 = ThisWorkbook
If ActiveWindow.WindowState <> xlMaximized Then ' exits if window is not maximized
Exit Sub
End If
If Not wb1.Name Like "Workbook1.xlsm" Then ' exits if book is renamed
Exit Sub
End If
ActiveWindow.NewWindow
Application.Windows.Arrange ArrangeStyle:=xlVertical, ActiveWorkbook:=True ' vertical view
Windows("Workbook1:2").Activate ' activates window 2
ThisWorkbook.Worksheets("Sheet1").Range("A15").Select
ActiveWindow.FreezePanes = True ' freezes header
ActiveWindow.Zoom = 87 ' resets view for split window
Windows("Workbook1:1").Activate ' activates window 1
ActiveWindow.Zoom = 87 ' resets view for split window
ActiveWindow.SmallScroll ToRight:=16 ' scrolls right so second report is in view
End Sub
Hopefully a solution is possible, but if not, this way there won't be any errors.
Bookmarks