paste from clipboard after delete cells


G

Guest

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
 
Ad

Advertisements

D

Dave Peterson

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top