Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Selecting rows

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Selecting rows

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.

---
Regards,
Norman



"JT" wrote in message
...
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.



Reply
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
after selecting 50 rows of a column i can't reference the cells in the rows Bob Salzer New Users to Excel 2 July 21st 06 10:29 PM
Selecting Rows Coolboy55 Excel Worksheet Functions 4 August 22nd 05 04:07 PM
Selecting one every four other rows Juan Eduardo Gorigoitía Excel Programming 1 November 3rd 04 02:07 PM
Selecting rows Walshy[_2_] Excel Programming 6 September 15th 04 10:47 PM
Selecting Rows Alan Excel Programming 4 October 16th 03 09:10 PM


All times are GMT +1. The time now is 09:45 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"