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 |
All times are GMT +1. The time now is 07:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com