Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default paste from clipboard after delete cells

Hi,

I am writing a macro in Excel 2000

Cells.Select
Selection.Copy

'then move to another sheet in another workbook.
Sheets(currentsheeti).Select
'delete all cell data in the sheet
Cells.Delete

'copy from the clipboard starting at cell A1
Range("A1").Select
ActiveSheet.Paste

Problem : the cells.delete statement clears out the clipboard and so the
activesheet.paste command does not work.

How can delete then still paste the clipboard. Due to order of events it
would be difficult to first delete then copy to clipboard, then paste.

Please advise.

Thanks

Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default paste from clipboard after delete cells

sheets(currentsheeti).cells.delete
sheets(othersheetnamehere).cells.copy _
destination:=sheets(currentsheeti).range("a1")



Chris wrote:

Hi,

I am writing a macro in Excel 2000

Cells.Select
Selection.Copy

'then move to another sheet in another workbook.
Sheets(currentsheeti).Select
'delete all cell data in the sheet
Cells.Delete

'copy from the clipboard starting at cell A1
Range("A1").Select
ActiveSheet.Paste

Problem : the cells.delete statement clears out the clipboard and so the
activesheet.paste command does not work.

How can delete then still paste the clipboard. Due to order of events it
would be difficult to first delete then copy to clipboard, then paste.

Please advise.

Thanks

Chris


--

Dave Peterson
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
Paste from clipboard only taa Excel Worksheet Functions 0 January 14th 08 06:15 PM
Paste clipboard to a comment Meltad Excel Programming 7 August 8th 06 03:48 PM
Store clipboard before "vba do cut&paste" then recover stored information to clipboard? Marie J-son[_7_] Excel Programming 0 February 8th 06 05:59 AM
Paste, clipboard Lars Kofod Excel Programming 1 December 3rd 03 05:03 PM
paste special whatever is on the clipboard jrh Excel Programming 1 August 28th 03 09:22 PM


All times are GMT +1. The time now is 11:58 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"