Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy from workbook to workbook

xl2000
I am trying to update a lot of workbooks. I want to copy the formats and
formulas from a new workbook to all sheets named R* in the target workbook.
Below is my code so far.
Any help would be greatly appreciated.
Ta,
Martin

Public Sub CoPasTheLot()
Dim ws As Worksheet
Dim Source As Workbooks
Dim Target As Workbooks

Set Source = Workbooks("28Aug03")
Set Target = Workbooks("08Feb02")
For Each ws In Target
If Left(ws.Name, 1) = "R" Then
For Each ws In Target
Source.Worksheets("R1").Cells.Copy
Target.Worksheets(1).Cells.PasteSpecial xlFormats
Target.Worksheets(1).Cells.PasteSpecial xlFormulas
End If
Next
End Sub



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
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Excel-how to link source workbook to copy of destination workbook D Lynn Excel Worksheet Functions 1 May 29th 08 05:36 PM
Copy cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Discussion (Misc queries) 0 August 1st 07 07:43 PM
Copy cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Worksheet Functions 0 August 1st 07 07:43 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


All times are GMT +1. The time now is 10:12 PM.

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"