S
Steve
Hi,
I'm looking to have a macro that I've started (below) to allow me to go
out to a file that is always in the same location with the same name
and copy information from it and bring it back into the file I was
originally in. The file from which I want to get the information from
is updated automatically every 24 hours from data dumped into it from
our MRP system. The macro is to be stored in my "personal.xls" file.
The problem is that the original file name is always different. So how
can I make the macro come back to this file that has a different name
each time to paste the updated information into it?
In the macro below, it is the "190-DA125-F1V1-BOM-01.xls" file that has
a different name each time. Somehow, I need to run a macro that will
know to come back to the original file I have open each time and paste
the information in without having to worry about its name....
please help,
Steve
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 2/6/2006 by User
'
'
Workbooks.Open Filename:="S:\Doc\BOM Tools\Alt_Items_List.xls"
Range("A:A,J:J").Select
Range("J1").Activate
Selection.Copy
Windows("190-DA125-F1V1-BOM-01.xls").Activate
Range("L1").Select
ActiveSheet.Paste
End Sub
I'm looking to have a macro that I've started (below) to allow me to go
out to a file that is always in the same location with the same name
and copy information from it and bring it back into the file I was
originally in. The file from which I want to get the information from
is updated automatically every 24 hours from data dumped into it from
our MRP system. The macro is to be stored in my "personal.xls" file.
The problem is that the original file name is always different. So how
can I make the macro come back to this file that has a different name
each time to paste the updated information into it?
In the macro below, it is the "190-DA125-F1V1-BOM-01.xls" file that has
a different name each time. Somehow, I need to run a macro that will
know to come back to the original file I have open each time and paste
the information in without having to worry about its name....
please help,
Steve
Sub Macro5()
'
' Macro5 Macro
' Macro recorded 2/6/2006 by User
'
'
Workbooks.Open Filename:="S:\Doc\BOM Tools\Alt_Items_List.xls"
Range("A:A,J:J").Select
Range("J1").Activate
Selection.Copy
Windows("190-DA125-F1V1-BOM-01.xls").Activate
Range("L1").Select
ActiveSheet.Paste
End Sub