I
ianripping
I have these two Macro's at present: -
Sub ListFiles()
F = Dir("C:\*.XLS")
Do While Len(F) > 0
ActiveCell.Formula = F
ActiveCell.Offset(1, 0).Select
F = Dir()
Loop
End Sub
Sub CopyInfo()
Workbooks.Open Filename:=Range("A1").Value
Range("A:B").Copy Destination:=Workbooks("Book1").Range("B:C")
Workbooks.Close Filename:=Range("A1").Value
MsgBox ("Completed Copying")
End Sub
As you can see I want the Macro to open the file name in A1 then copy
the information, then paste it into Book1.xls, then cose the Filename
in A1.
So far it opens the workbook, but won't close it. I dont think I can
use the close command here, any ideas?
Sub ListFiles()
F = Dir("C:\*.XLS")
Do While Len(F) > 0
ActiveCell.Formula = F
ActiveCell.Offset(1, 0).Select
F = Dir()
Loop
End Sub
Sub CopyInfo()
Workbooks.Open Filename:=Range("A1").Value
Range("A:B").Copy Destination:=Workbooks("Book1").Range("B:C")
Workbooks.Close Filename:=Range("A1").Value
MsgBox ("Completed Copying")
End Sub
As you can see I want the Macro to open the file name in A1 then copy
the information, then paste it into Book1.xls, then cose the Filename
in A1.
So far it opens the workbook, but won't close it. I dont think I can
use the close command here, any ideas?