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
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