View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default offset property to define range

Art

testRng.Cells(1).Offset(3,0).Resize(3,3).ClearCont ents

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Art" wrote in message
...
I have an object variable for a range on the spreadsheet.
What is the easiest way to select a rectangular range on
the spreadsheet using the offset property (or something
similar).

I have this so far:

Dim testRng As Range
Set testRng = Worksheets("Sheet1").Range("A1:D20")
testRng.Value = 9
testRng.Cells(4 to 6,1 to 3).ClearContents 'error "to"