Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection boundaries 1

Status
Not open for further replies.

jerstep

Technical User
Mar 22, 2002
18
0
0
AT
Hello.
VBA in Excel 2000.
How do I determine the first/last row/column of a selection ?
Thanks.
J.
 
Hi, jerstep,

Here's the scoop...
Code:
With Selection
   FirstRow = .Row
   FirstCol  =.Column
   RowCount = .Rows.Count
   ColCount = .Columns.Count
End With
LastRow = RowCount + FirstRow - 1
LastCol = ColCount + FirstCol - 1
Hope this helps :) Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top