View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Art[_5_] Art[_5_] is offline
external usenet poster
 
Posts: 5
Default offset property to define range

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"