Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a Range from an Offset for deletion - Help please
I have the following code in my macro but get a RunTime error 1004 where
indicated. I would much appreciate guidance on how to rectify this. Thanks in advance. Sub Test() Dim RowValue As Integer Dim ColumnValue As Integer Dim TradeAttribute As Integer 'ActiveCell is on Sheets("Control") RowValue = ActiveCell.Row ColumnValue = ActiveCell.Column TradeAttribute = Sheets("Control").Cells(11, ColumnValue) 'When I run the macro I get Run Time error 1004:Select method of Range Class failed ' and the line of code below is highlighted. Sheets("Detail").Range("VarInput").Offset((RowValu e - 12) * 500, TradeAttribute).Select 'I want to select a range of 497 cells below the cell selected on Sheets("Detail") for deletion Range("A1:A497").Select Selection.ClearContents End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting objects for deletion in 2007 | Excel Discussion (Misc queries) | |||
Selecting offset cells | Excel Discussion (Misc queries) | |||
Selecting a range offset from a cell | Excel Programming | |||
Range deletion | Excel Programming | |||
Selecting cell using range.offset | Excel Programming |