Moving active cell in several opened windows

A

Andrei Zakharov

Hi,

I have a worksheet opened in two windows: File:1 and File:2.
I do call
ActiveCell.Offset(1, 0).Activate
in VBA code to make active cell move one row down in the sheet. But this
occurs only in the one window, e.g. File:1.
How is it to make active cell move the same way in the other window?

Thanks.
 
J

Joel

Aviod using Activate. It is hard to follow the code. reference cells
directly.


set wk1 = workbooks("Book1.xls).sheets("Sheet1")
set wk2 = workbooks("Book2.xls).sheets("Sheet2")


wk1.Range("A3") = wk1.Range("B4")


move down rows

for RowCount = 3 to 10
wk1.Range("A" & Count) = wk1.Range("B" & (count+1))
next RowCount
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top