Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference filename used in code from cell
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\AManpowe rhcv0.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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell reference to a filename | Excel Discussion (Misc queries) | |||
Excel - print to .pdf using filename reference from cell | Excel Discussion (Misc queries) | |||
substitute the filename in a cell reference with a string in another cell. | Excel Discussion (Misc queries) | |||
Cell Reference is Worksheet Name in VB Code | Excel Programming | |||
Reference in a filename.. | Excel Worksheet Functions |