[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Re: Moving Rows (Basic VBA Stuff

Don Guillett

12/11/2006 4:56:00 PM

Sub moveselection()
Selection.Cut
Cells(ActiveCell.Row - 4, 1).Insert
End Sub

--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"None" <erobins@charter.net> wrote in message
news:rnp4q25nfdcuq58a1ogp41pvk3uuu72j3k@4ax.com...
> Rather than cut and paste rows, if there a way to select a range of
> cells and just move them up or down a set number of rows? (I say a
> range of cells, because on some sheets each record may contain more
> than one row of data) The Pseudo code below gives an idea of the
> context of what I am doing. The * line is the one in question. IF cut
> and paste is the best way, could you post the cut and paste method?
>
> Compare code
> IF need to move up THEN
> SELECT Rows for this Record.
> *MOVE SELECTED Range up or down # of rows. *
> END IF
>