Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default Copy current row to clipboard and delete row

I would like to create a macro that will copy the row of the cell that the
cursor is currently in and delete that row.

How to do?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Copy current row to clipboard and delete row

Hi,

The 2 lines below will do what you require but you need to do something in
between because when you delete the row you lose the copied data.

ActiveCell.EntireRow.Copy
'Do something with the copied data i.e paste it somewhere else
ActiveCell.EntireRow.Delete

Mike

"GKW in GA" wrote:

I would like to create a macro that will copy the row of the cell that the
cursor is currently in and delete that row.

How to do?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Copy current row to clipboard and delete row

Mike wrote on Sat, 19 Apr 2008 06:52:00 -0700:

MH The 2 lines below will do what you require but you need to
MH do something in between because when you delete the row you
MH lose the copied data.

MH ActiveCell.EntireRow.Copy
MH 'Do something with the copied data i.e paste it somewhere
MH else ActiveCell.EntireRow.Delete

MH Mike

MH "GKW in GA" wrote:

?? I would like to create a macro that will copy the row of
?? the cell that the cursor is currently in and delete that
?? row.

The number of modifications that are available in VBA for
ActiveCell is amazing to me. Can you (or anyone else) suggest a
good book with a reasonably complete list of functions,
prefererably one that also teaches VBA for Excel?


James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.verizon.not

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Copy current row to clipboard and delete row

Hi,

The activecell statement returns a range object and you can apply any of the
properties or methods of a range object to the active cell.

With regard to a book the one produced by John Walkenbach is one I found and
still find invaluable.

http://www.amazon.com/Excel-2003-Bib.../dp/0764539671

Mike

"James Silverton" wrote:

Mike wrote on Sat, 19 Apr 2008 06:52:00 -0700:

MH The 2 lines below will do what you require but you need to
MH do something in between because when you delete the row you
MH lose the copied data.

MH ActiveCell.EntireRow.Copy
MH 'Do something with the copied data i.e paste it somewhere
MH else ActiveCell.EntireRow.Delete

MH Mike

MH "GKW in GA" wrote:

?? I would like to create a macro that will copy the row of
?? the cell that the cursor is currently in and delete that
?? row.

The number of modifications that are available in VBA for
ActiveCell is amazing to me. Can you (or anyone else) suggest a
good book with a reasonably complete list of functions,
prefererably one that also teaches VBA for Excel?


James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.verizon.not


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Copy current row to clipboard and delete row

Mike wrote on Sat, 19 Apr 2008 07:22:00 -0700:

MH The activecell statement returns a range object and you can
MH apply any of the properties or methods of a range object to
MH the active cell.

MH With regard to a book the one produced by John Walkenbach
MH is one I found and still find invaluable.

MH
http://www.amazon.com/Excel-2003-Bib.../dp/0764539671

MH Mike

Thanks, that looks like a good bet. I've used his "Excel 2002
formulas" for a long time; so much so that I have the PDF
version on disk.


James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.verizon.not

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
clipboard copy & paste SAGknot Excel Discussion (Misc queries) 1 June 12th 07 01:36 PM
Copy chart to clipboard - VBA Fredrik E. Nilsen Charts and Charting in Excel 11 April 27th 07 01:25 PM
Clear Clipboard after Copy Connie Excel Discussion (Misc queries) 2 November 8th 06 07:20 AM
copy to the clipboard and into another workbook Mark Dvorkin Excel Discussion (Misc queries) 2 February 24th 06 02:41 AM
Can't copy without clipboard open Bill Williams Excel Discussion (Misc queries) 0 January 4th 05 04:41 PM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"