Copy from workbook to workbook

M

Martin Wheeler

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
 

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