Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Shift a cut row up

try this as an alternative:

Sheets("Database").Rows(iSourceRow).Copy
Sheets("archive").Rows(iTgtRow).PasteSpecial xlValues
Sheets("Database").Rows(iSourceRow).Delete

"Risky Dave" wrote in message
...
Hi,

I have some code that cuts a row from one sheet (Database) and pastes it
into another one (Archive):

Dim iSourceRow As Integer
Dim iTgtRow As Integer

Sheets("Database").Range(iSourceRow & ":" & iSourceRow).cut_
Destination:=Sheets("archive").Range(iTgtRow & ":" & iTgtRow)

This works fine except that I cannot get the Database sheet to shift up
all
teh rows below the one that is cut (so that all the data rows are
contiguous). I have tried adding

Shift:= xlUp to the line above, but this generates an "Expected: end of
statement" error

Suggestions on how I can get the rows to move up woould be welcome.

TIA

Dave


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
SHIFT G Palle Excel Discussion (Misc queries) 2 March 26th 08 11:19 PM
Shift-JIS to UTF-8 dolsen[_2_] Excel Programming 0 July 5th 07 09:01 PM
Shift Key pan65 Excel Programming 1 June 1st 07 10:33 AM
What's This? help (Shift-F1) Martin Excel Programming 0 December 11th 06 11:54 AM
How 2 use right shift "<<" and left shift "" operator in excel? v-2ajpau Excel Programming 2 December 28th 05 01:33 PM


All times are GMT +1. The time now is 07:37 AM.

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"