How do I delete everything below row X in VBA/Excel?

Viewed 128819

I have a long variable X that contains a number. Say it's 415.

How do I delete everything on the worksheet from Row 415 and below?

I want to ensure my spreadsheet is clean in Row 415 and anything else that might be below it.

How do I do this? Thanks.

4 Answers

Any Reference to 'Row' should use 'long' not 'integer' else it will overflow if the spreadsheet has a lot of data.

Related