View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Suzette[_3_] Suzette[_3_] is offline
external usenet poster
 
Posts: 2
Default referencing the activecell

I'm stumped. I am wanting to copy information from cells in workbook A to
workbook B. I want to cycle through several rows but would rather not
bounce back and forth activating each WB. Is there a way to reference the
active cell in each workbook?

I tried setting a variable to the worksheet but it doesn't like it.

Set wb1 = ActiveWorkbook
Set ws1 = wb1.Worksheets(2)

Set wb2 = Workbooks.Open(strDir & strFile)
Set ws2 = wb.Worksheets(2)
ws1.Activecell = ws2.Activecell <---- This is the line I want to
use but this code doesn't work.

Thanks in advance.

Suzette