Rows.select problem!

Closed
RD - Jul 31, 2009 at 08:16 PM
 RD - Aug 1, 2009 at 12:28 PM
Hello,
I am working on a Excel 2003 VB automated routine to remove rows from a worksheet based on a number of variables. My problem is syntax.... As I loop through the rows, I find the top of rane of rows to be deleted. I assign a variable called 'top_row' to the entire row, and 'bottom_row' to the entire bottom row.

I want to do: rows(top_row:bottom_row).select but I get a compile error: expected list separator or )

one syntax that does work when selecting a given column: range("B" & active_row).select but every idea I can think of for the rows just fails!!!

any help??

Ross

2 responses

Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 307
Aug 1, 2009 at 12:16 PM
Hello RD

Try rows(top_row & ":" & bottom_row).select
1
Dear ExcelGuru --

Thank You! I think that is the ONE permutation I did not try! I was able to tackle it another way:

Range(Rows(top_row), Rows(bottom_row)).Select

... I gave it one more try!

I also do custom excel development in the area of complex order configuration and pricing. Also doing financial projects for start ups...

Thanks again!!!
0