Selecting rows

  • Thread starter Thread starter JT
  • Start date Start date
J

JT

I want to select rows. However, the first row will always
be different, so I am trying to use a variable. Here is
the code that is not working:


Dim vlastrow As Integer
vlastrow = Cells.SpecialCells(xlCellTypeLastCell).Row
FIRSTROW = vlastrow + 1
Rows((FIRSTROW), "65000").EntireRow.Select

Any suggestions would be appreciated. Thanks for the help.
 
Hi JT,

Try:

Sub Tester03()
Dim FirstRow As Long

FirstRow = Cells.SpecialCells(xlCellTypeLastCell).Row + 1
Rows(FirstRow).Resize(Rows.Count - FirstRow + 1).Select

End Sub

Note that it is rarely necessary to make physical range selections.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top