View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jayklmno jayklmno is offline
external usenet poster
 
Posts: 58
Default Range refernce question...

If I am referring to a range not on the active sheet, why does this work
triggered from a Macro button on Sheet1...

Sheets("Sheet2").Range("A2:G57").ClearContents

But this will not?

Sheets("Sheet2").Range(Cells(2, 1), Cells(endrow, 7)).ClearContents

If I am on Sheet2, the above code works.

Why?