Cell referencing

  • Thread starter Thread starter ED
  • Start date Start date
E

ED

I want to reference cells in sheet one and cells in sheet two in a
macro. How is that best done?
 
With ActiveWorkbook
Sheets("Sheet1").Range(A1).-Action-
Sheets("Sheet2").Range(A1).-Action-
End Wit
 
Hi
something like

sub foo()
dim rng1 as range
dim rng2 as range

set rng1 = worksheets("sheet1").range("A1")
set rng2 = worksheets("sheet2").range("A1")

msgbox rng1.value & " - " & rng2.value
end sub
 

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

Back
Top