View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
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