Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Copy and paste contents of one sheet into another



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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
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 ***

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
copy and paste contents of sheet [email protected] Excel Programming 1 November 15th 06 04:02 PM
copy and paste and clipboard contents message dr chuck Excel Programming 3 June 25th 06 04:31 PM
copy paste delete cell contents Garry Excel Discussion (Misc queries) 0 March 27th 06 08:26 PM
Cut and paste or Copy just cell contents? Tom Meacham Excel Discussion (Misc queries) 1 January 11th 06 06:58 PM
Copy contents in a row and paste in a column CJMFH Setting up and Configuration of Excel 1 July 15th 05 03:14 PM


All times are GMT +1. The time now is 07:03 PM.

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"