View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default reference format Range(Cells(),Cells())

Hi Steffi,

My post dropped the initial lines and should have resd:

ThisWorkbook.Worksheets("shname").Range(Cells(2, colNo1), Cells(2,
colNo2)).ClearContents


is equivalent to:

ThisWorkbook.Worksheets("shname"). _
Range(ActiveSheet.Cells(2, colNo1), ActiveSheet.Cells(2, colNo2)). _
ClearContents

As previously indicated, this will fail if the active sheet is not the
shname sheet.

---
Regards,
Norman


"Norman Jones" wrote in message
...
Hi Steffi,

ThisWorkbook.Worksheets("shname"). _
Range(ActiveSheet.Cells(2, colNo1), ActiveSheet.Cells(2, colNo2)). _
ClearContents

As previously indicated, this will fail if the active sheet is not the
shname sheet.


---
Regards,
Norman