VBA: Count the rows in a Selection

August 14th, 2004 | Categories: Cells, Columns & Rows | Tags: , ,

If you ever need to count the number of rows that were selected, use Selection.Rows.Count

Put this in a module:

Public Sub CountMyRows()
MsgBox Selection.Rows.Count
End Sub

Get LIVE Help
Custom Excel solutions & live Excel help!
► Go to www.ExcelAutomationHelp.com
► Email Now@ExcelAutomationHelp.com
No comments yet.