![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com