J
Jim73
Hi,
I am trying to populate one sheet with data from 120 other workbooks/sheets.
They all have the same template. When running the code below it cant find the
requested sheet. Is there a problem with my way of opening the file? I have
confirmed that the name exist and is correct.
Sub Upload()
Dim fs, f, s, fc, f1, f2
f2 = ThisWorkbook.Path
Set fs = CreateObject("scripting.filesystemobject")
Set f = fs.getfolder(f2 + "\files\")
Set fc = f.Files
For Each f1 In fc
Open f1 For Binary Access Read As #1
Sheets("Business Overview").Range("B4:c38").Copy
Windows("VB_work.xls").Activate
Sheets("temp").Range("h3").Paste
Workbooks(s).Close
Windows("VB_work.xls").Activate
Next
End Sub
/Jim
I am trying to populate one sheet with data from 120 other workbooks/sheets.
They all have the same template. When running the code below it cant find the
requested sheet. Is there a problem with my way of opening the file? I have
confirmed that the name exist and is correct.
Sub Upload()
Dim fs, f, s, fc, f1, f2
f2 = ThisWorkbook.Path
Set fs = CreateObject("scripting.filesystemobject")
Set f = fs.getfolder(f2 + "\files\")
Set fc = f.Files
For Each f1 In fc
Open f1 For Binary Access Read As #1
Sheets("Business Overview").Range("B4:c38").Copy
Windows("VB_work.xls").Activate
Sheets("temp").Range("h3").Paste
Workbooks(s).Close
Windows("VB_work.xls").Activate
Next
End Sub
/Jim