Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Error getting Row number

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Error getting Row number

With Selection
rownum = .Row - 1 + .Rows.Count
End With

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

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



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
number input error Mick Excel Discussion (Misc queries) 2 August 24th 08 11:15 AM
whole number error? Shane Excel Discussion (Misc queries) 2 July 2nd 08 06:52 PM
Big number error pcor New Users to Excel 2 November 5th 07 03:53 AM
Number Stored as text Error Torero Excel Worksheet Functions 2 December 1st 06 01:28 PM
Error number 1004 Alain Turgeon Excel Programming 1 June 23rd 04 09:58 PM


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