VB6 and Excel spreadsheet - Delete Unspecified range of cells

03-21-2008, 02:39 PM
Hello everyone,
just one more thing on my spreadsheet manipulation: Currently I am hard-coding deletion of a range of cells. However, this range may change at any given time, in other words, there is no limited to where the data ends(number of records in the spreadsheet may vary).

For example, this is what I have now.

Rows("3:1972").Delete Shift:=xlUp

I want it to be dynamic - like so:

Rows("A3:?????").Delete Shift:=xlUp

Thanks in advance for any help.

Colin Legg
03-21-2008, 04:29 PM
There must be thousands of examples in this board on how to determine the last row within a column. There is even an example in the FAQ section (lesson 2) which you could adapt if it's not too much trouble for you.
You should always do a search before you post a question to see if it has already been answered.

I also see that you have received responses in another forum where you have posted the same question. :-\
The answer you have received (at the moment) is reasonable (but not the best way) so I would recommend looking in the FAQ section as I mentioned earlier.

And again, I reiterate my point on your earlier post about unqualified referencing. :whoops:

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum