rdoulaghsingh
Board Regular
- Joined
- Feb 14, 2021
- Messages
- 105
- Office Version
- 365
- Platform
- Windows
I am trying to call the workbook name with a " - 1" at the end for a VBA script to run side by side windows. Based on Microsoft documentation, "You cannot use the CompareSideBySideWith method with the Application object or the ActiveWorkbook property." Any suggestions on a similar method to make this work? Any help would be greatly appreciated. Thanks!
VBA Code:
Sub CompareSideBySide( )
ActiveWindow.NewWindow
Windows.CompareSideBySideWith _
("""" & ActiveWorkbook.name & " - 1""")
Windows.Arrange ArrangeStyle:=xlVertical
ActiveWindow.SmallScroll Down:=-4
End Sub