I am looking to run through every spreadsheet in a folder, and paste all data from the spreadsheet into an exisiting, blank, worksheet in a separate spreadsheet.
The code I have so far is:
[vba]
Sub ReloadSFT()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
Dim Path As String
Dim FN As String
Dim c As Range, Rng As Range
Home = "C:\Temp\Iain.xls"
Path = "G:\Temp\Warehouse\"
FN = Dir(Path & "*.xls", vbNormal)
For Each FN In Dir()
Sheets("Sheet1").Select
Range("A1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
Home Sheets("Reload Data").Select
Range("A1").Select
ActiveSheet.Paste
ActiveWorkbook SaveAs(Path & Range("A2") & "Reload.xls")
Next FN
End Sub
[/vba]
It doesn't seem to like something within this code, although I'm not entirely sure what as I've changed most things around. I think the problem may be in the
[vba]For each FN in Dir() [/vba]part, not entirely sure though
Any help would be appreciated, as I think this should be reasonably straightforward!
Thanks