windows.sheets ?

D

David C.

Hello,

I've got 2 windows of the same sheet (same workbook)
This is the way excel gives you the top, the middle and the bottom of a same
sheet.

When I scroll the columns, and select an other window, it foolows the
scroll:
with ActiveWorkbook
..windows(1).ScrollColumn = .windows(2).ScrollColumn
end with

this works fine.
The point is my workbook doesn't have only one sheet, and I would like to
access the right one !
(of course)

I need something like:
.windows(i).scrollcolumn(of sheets1)
or:
.windows(i).Sheet1.scrollcolumn

of course, this is not a known syntax ! it only knows windows.activesheet
Excel has got the data (the scrollcolumn of sheet1 in the window(i) ) inside
its head, how do I get it ?
 
M

merlin

Sub ActivateSheet()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Sheets(1)
ws.Activate
End Sub
 
Top