LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting objects for deletion in 2007 Squeaky Excel Discussion (Misc queries) 7 May 5th 09 10:12 PM
Selecting offset cells Zygan Excel Discussion (Misc queries) 2 June 4th 06 10:03 AM
Selecting a range offset from a cell Beeegr8 Excel Programming 2 April 1st 05 08:02 PM
Range deletion gavmer[_46_] Excel Programming 1 July 2nd 04 01:09 AM
Selecting cell using range.offset presence76[_3_] Excel Programming 2 June 9th 04 03:46 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"