I
ianripping
First of all I rin this Macro: -
Sub ListFiles()
F = Dir("C:\*.XLS")
Do While Len(F) > 0
ActiveCell.Formula = F
ActiveCell.Offset(1, 0).Select
F = Dir()
Loop
End Sub
This list the filenames in the directory.
Now I want this macro to copy the information from the file name i
cell A1.
I tried this but there was no luck: -
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 15/01/2004 by Ian
'
Workbooks.Open Filename:= (A1)
Range("A:B").Copy Destination:=Workbooks("Book1").Range("A:B")
MsgBox ("Completed Copying")
End Sub
ANY IDEA HOW TO MAKE THIS REFERENCE LOOK AT CELL A1 as a file name
Sub ListFiles()
F = Dir("C:\*.XLS")
Do While Len(F) > 0
ActiveCell.Formula = F
ActiveCell.Offset(1, 0).Select
F = Dir()
Loop
End Sub
This list the filenames in the directory.
Now I want this macro to copy the information from the file name i
cell A1.
I tried this but there was no luck: -
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 15/01/2004 by Ian
'
Workbooks.Open Filename:= (A1)
Range("A:B").Copy Destination:=Workbooks("Book1").Range("A:B")
MsgBox ("Completed Copying")
End Sub
ANY IDEA HOW TO MAKE THIS REFERENCE LOOK AT CELL A1 as a file name