View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Copy and paste contents of one sheet into another

Darin,

try something like this:

Sub test()
Dim sh As Worksheet

For Each sh In Workbooks("A.xls").Worksheets
sh.Cells.Copy
Destination:=Workbooks("B.xls").Worksheets(sh.Name ).Cells(1, 1)
Next sh

End Sub


--
Hope that helps.

Vergel Adriano


"Darin Kramer" wrote:



Hi,

Ive got two books open, say book a and book b.

I need to systematically go through all the sheets in Book A and for
each sheet select all cells, copy, and then goto the sheet in Book B
(with the same name, but which is blank) and paste all the cells.

Your expert held would be most appreciated by me (not so expert!)

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***