Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
testRng(4, 1).Resize(3, 3).ClearContents is probably easier.
Alan Beban Dick Kusleika wrote: Art testRng.Cells(1).Offset(3,0).Resize(3,3).ClearCont ents |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Define Name range | Excel Discussion (Misc queries) | |||
Define a range | Excel Discussion (Misc queries) | |||
Define a range based on another named range | Excel Worksheet Functions | |||
Define Range with an offset | Excel Discussion (Misc queries) | |||
Re : MS Excel’s Offset Property | Excel Programming |