Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error getting Row number
try
x = Cells(ActiveCell.Row, ActiveCell.Column).End(xlDown).Row MsgBox x -- Don Guillett SalesAid Software "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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
number input error | Excel Discussion (Misc queries) | |||
whole number error? | Excel Discussion (Misc queries) | |||
Big number error | New Users to Excel | |||
Number Stored as text Error | Excel Worksheet Functions | |||
Error number 1004 | Excel Programming |