Copy worksheet from Active workbook into all other open workbooks

T

TroyB

Hi,

Ammending the below code, how can I complete the following ;
1) copy a worksheet (named "Invoice") from the activesheet into all other
open workbooks (in the first worksheet position).
2) have cell F8 in all the new workbooks match the cell ref for each of the
i,3 values in the activesheet

Sub NewFiles()
Const cPath = "C:\Temp\"

Dim wkb As Workbook, i As Long, lngLastRow As Long, sht As Worksheet

With ActiveSheet
lngLastRow = .Cells(Rows.Count, 3).End(xlUp).Row
For i = 12 To lngLastRow
Set wkb = Workbooks.Add
wkb.SaveAs cPath & .Cells(i, 3).Value

Next
End With

End Sub

Thanks
Troy
 

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