Update: Ended up finding a solution by using the windows index number. This also solves the problem of having multiple workbooks open, as it will exit the sub if that condition exists
Sub SplitView()
' vertically splits view, set to not work if more than one window is open to include other workbooks
If Windows.count > 1 Then ' exits if windows are more than one (includes open workbooks)
Exit Sub
End If
ActiveWindow.NewWindow
Application.Windows.Arrange ArrangeStyle:=xlVertical, ActiveWorkbook:=True ' vertical view
Windows(1).Activate ' activates window 2
ThisWorkbook.Worksheets("Sheet1").Range("A15").Select
ActiveWindow.FreezePanes = True ' freezes header
ActiveWindow.Zoom = 87 ' resets view for split window
Windows(2).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
Marking this as solved.
Thanks
Bookmarks