Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
<<...your code only moves step by step.
That's what TAB does. <<Would you kindly recommend me a piece of code for moving to the last cell selected in the range? To move to the last cell in a selection, regardless of whether it has data in it or not, try the following: '---------------------------------------------------------------------- Public Sub ActivateLastCellInSelection() Dim rngSelection As Range Dim rngLastCell As Range On Error GoTo ExitSub Set rngSelection = Selection With rngSelection Set rngLastCell = .Resize(1, 1) _ .Offset(.Rows.Count - 1, _ .Columns.Count - 1) rngLastCell.Activate End With ExitSub: End Sub -- Regards, Bill Renaud |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving range? | Excel Discussion (Misc queries) | |||
sum with moving range | Excel Discussion (Misc queries) | |||
Moving to next row below a selected range | Excel Programming | |||
formula with moving range | Excel Discussion (Misc queries) | |||
VB: moving data range | Excel Programming |