Hi All, I have an issue with the Windows.Activate property.
I have a macro that vertically splits the view into two windows for the user, and the problem is the specific workbook reference in the syntax.
Here is what I have so far:
Sub SplitView()
' vertically splits view
Dim wb1 As Workbook
Set wb1 = ThisWorkbook
If ActiveWindow.WindowState <> xlMaximized Then
Exit Sub
End If
ActiveWindow.NewWindow
Application.Windows.Arrange ArrangeStyle:=xlVertical, ActiveWorkbook:=True
Windows("Workbook1.xlsm:2").Activate
ThisWorkbook.Worksheets("Sheet1").Range("A15").Select
ActiveWindow.FreezePanes = True
Windows("Workbook1.xlsm:1").Activate
ActiveWindow.SmallScroll ToRight:=16
The name of this workbook will change and therfore throw up a reference error, so I was wondering if someone could point me in the right direction. I can't quite figure out how to reference wb1 in the Windows.Activate property.
Thanks!
Bookmarks