Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I'm not trained in VB so may be missing something but this seems tider
because it doesn't change the user's selection and has less lines. Also it checks for top row. Sub MoveDown() Range(ActiveCell.Row + 1 & ":" & ActiveCell.Row + 1).Cut 'Cut row below ActiveCell.EntireRow.Insert Shift:=xlDown 'Paste ActiveCell.Offset(1, 0).Select 'Move down to it End Sub Sub MoveUp() If ActiveCell.Row 1 Then Range(ActiveCell.Row & ":" & ActiveCell.Row).Cut 'Cut active row ActiveCell.Offset(-1, 0).Select 'Move up a row ActiveCell.EntireRow.Insert Shift:=xlDown 'Paste End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving data from multiple rows to single rows | Excel Worksheet Functions | |||
CODE 4 MOVING WITHIN A RANGE-TAB | Excel Discussion (Misc queries) | |||
Moving Code | Excel Programming | |||
Code for moving cursor one cell to the right | Excel Programming | |||
Code for moving textbox | Excel Programming |