Thanks to all who have helped me so far. I have 2 quick questions.
I have the current code as follows:
Sub test()
Dim Source As String
Dim Path As String
Dim sht As String
Path = Worksheets("List").Cells(1, 1)
For i = 0 To 500
Source = Worksheets("list").Cells(2 + i, 1)
ChDir Path
Workbooks.Open FileName:=Source
Windows("Estimate Summary.xls").Activate
Worksheets("ITEMS").Select
Worksheets("ITEMS").Cells(6 + i, 1).Select
strfile = Source
ActiveCell.FormulaR1C1 = "='" & strfile & "'!R9C3"
If Source = blank Then End
Next
End Sub
And it works fine, what I can't figure out is how to get the a variable for every given worksheeet in the workbook soucre. As you can tell Souce just refereces a cell in the current worksheet that is a name of a workbook with souce information. Each souce workworrk has 30 worksheets in it. The above works great in getting to the first worksheet. Then it stops. Any sugestions out there?
Also is there a way to go into workbooks and disassociate all the old links? I have kind of made a mess of some sheets experimenting with these macros linking them together. When I am done I don't want a bunch of bogus links lurking out there.
Thanks in advance, this forum is a great resouce.
I have the current code as follows:
Sub test()
Dim Source As String
Dim Path As String
Dim sht As String
Path = Worksheets("List").Cells(1, 1)
For i = 0 To 500
Source = Worksheets("list").Cells(2 + i, 1)
ChDir Path
Workbooks.Open FileName:=Source
Windows("Estimate Summary.xls").Activate
Worksheets("ITEMS").Select
Worksheets("ITEMS").Cells(6 + i, 1).Select
strfile = Source
ActiveCell.FormulaR1C1 = "='" & strfile & "'!R9C3"
If Source = blank Then End
Next
End Sub
And it works fine, what I can't figure out is how to get the a variable for every given worksheeet in the workbook soucre. As you can tell Souce just refereces a cell in the current worksheet that is a name of a workbook with souce information. Each souce workworrk has 30 worksheets in it. The above works great in getting to the first worksheet. Then it stops. Any sugestions out there?
Also is there a way to go into workbooks and disassociate all the old links? I have kind of made a mess of some sheets experimenting with these macros linking them together. When I am done I don't want a bunch of bogus links lurking out there.
Thanks in advance, this forum is a great resouce.