Error getting Row number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I have the follow in part of a sub.


Private Sub Workbook_SheetSelectionChange
..
<code>
RowNum = ActiveCell.Row
<code>
..
End Sub

The problem is when I select multiple rows I either get error messages or
freeze Excel (2002 w/ XP).
How do I change this so that if multiple rows are selected only then only
the bottom row is looked at for naming my variable.
Thanks in advance,
Brad K
 
try

x = Cells(ActiveCell.Row, ActiveCell.Column).End(xlDown).Row
MsgBox x
 

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

Similar Threads


Back
Top