LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell reference to a filename Stevep4 Excel Discussion (Misc queries) 10 January 14th 09 10:30 PM
Excel - print to .pdf using filename reference from cell scooppbear Excel Discussion (Misc queries) 1 May 17th 06 02:36 AM
substitute the filename in a cell reference with a string in another cell. flummi Excel Discussion (Misc queries) 11 February 22nd 06 01:14 PM
Cell Reference is Worksheet Name in VB Code mangesh_yadav[_275_] Excel Programming 0 June 10th 05 04:48 AM
Reference in a filename.. Frode Hjoennevaag Excel Worksheet Functions 3 April 14th 05 02:47 PM


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"