Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a file from a cell value


Hello!

How do I open a particular file thats located on a drive from the name
that's located in a particular cell.

Example: In cell A1 is the filename Rawmix.xls

The path would be: I:\PLANT\LAB\Lab Tech Stuff

The macro button is on the same sheet as the filename.
I want the code to open the file by the name in A1, looking at the
path. This is useful for me because I can change the name of the file
(in cell A1) to another file that has the same path.

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=495914

  #2   Report Post  
Posted to microsoft.public.excel.programming
jtp jtp is offline
external usenet poster
 
Posts: 1
Default Opening a file from a cell value


Hey EMoe, try this

Workbooks.open Filename:="I:\PLANT\LAB\Lab Tech Stuff\"
Range("A1").value

Merry Christmas,

Jaso

--
jt
-----------------------------------------------------------------------
jtp's Profile: http://www.excelforum.com/member.php...fo&userid=2113
View this thread: http://www.excelforum.com/showthread.php?threadid=49591

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Opening a file from a cell value

The line:
Workbooks.open "I:\PLANT\LAB\Lab Tech Stuff\" &
Activesheet.Range("A1").Value
should do it



EMoe wrote:
Hello!

How do I open a particular file thats located on a drive from the name
that's located in a particular cell.

Example: In cell A1 is the filename Rawmix.xls

The path would be: I:\PLANT\LAB\Lab Tech Stuff

The macro button is on the same sheet as the filename.
I want the code to open the file by the name in A1, looking at the
path. This is useful for me because I can change the name of the file
(in cell A1) to another file that has the same path.

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=495914


Reply
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
how do i set up opening a file from a cell in excel spreadsheet Scott Excel Discussion (Misc queries) 1 September 21st 09 06:01 PM
how do i set up opening a file from a cell in excel spreadsheet Scott Excel Discussion (Misc queries) 2 September 21st 09 02:39 PM
"Too many different cell formats" is preventing file from opening Jed Excel Discussion (Misc queries) 1 September 30th 05 09:40 PM
Deleting cell borders before file opening error occurs? timlow Excel Programming 4 July 8th 05 10:13 PM
How? to go to cell when opening file dpj Excel Programming 3 October 12th 03 06:04 PM


All times are GMT +1. The time now is 03:53 PM.

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

About Us

"It's about Microsoft Excel"