S
shamble
Hi all
I am using the code below to update a spreadsheet with information from
another. What I would like to know is the line with the <<<<<<< is
there any way to reference that filename from a cell instead of
specifying it in the code. For example the filename would be contained
in a sheet called 'M' in cell 'A1'. That way we could enter the name of
the file we want to update into a cell to save messing with the code at
a future date. Thanks in advance
Sheets("ASC").Select
ChDir "\\w2k6001\shared\csdgapp\miteam\Manpower"
Workbooks.Open Filename:= _
"\\w2k6001\shared\CSDGAPP\miTeam\Manpower\AManpowerhcv0.2.xls"
Sheets("ASC").Select
Range("D7").Select
ActiveWindow.TabRatio = 0.943
ActiveWindow.SmallScroll ToRight:=5
ActiveWindow.SmallScroll Down:=69
Range("D7:Q106").Select
Selection.Copy
Windows("060313_hc.xls").Activate <<<<<<<<<<<
Range("D7").Select
ActiveSheet.Paste
I am using the code below to update a spreadsheet with information from
another. What I would like to know is the line with the <<<<<<< is
there any way to reference that filename from a cell instead of
specifying it in the code. For example the filename would be contained
in a sheet called 'M' in cell 'A1'. That way we could enter the name of
the file we want to update into a cell to save messing with the code at
a future date. Thanks in advance
Sheets("ASC").Select
ChDir "\\w2k6001\shared\csdgapp\miteam\Manpower"
Workbooks.Open Filename:= _
"\\w2k6001\shared\CSDGAPP\miTeam\Manpower\AManpowerhcv0.2.xls"
Sheets("ASC").Select
Range("D7").Select
ActiveWindow.TabRatio = 0.943
ActiveWindow.SmallScroll ToRight:=5
ActiveWindow.SmallScroll Down:=69
Range("D7:Q106").Select
Selection.Copy
Windows("060313_hc.xls").Activate <<<<<<<<<<<
Range("D7").Select
ActiveSheet.Paste