ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Open file from address in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/170104-open-file-address-cell.html)

David P.

Open file from address in a cell
 
Let's say that the value of cell A1 was "C:\Work Documents\David's
Folder\Schedule.xls" and I wanted to click a button to run a macro that
open's the file referenced in A1. Is that possible and if so how can it be
done?

The value of A1 would change continually so the macro could not always
reference "C:\Work Documents\David's Folder\Schedule.xls" for example.

Many thanks.
--
David P.

Mike H

Open file from address in a cell
 
Try

Workbooks.Open Filename:=Sheets("Sheet1").Range("A1").Value

Mike

"David P." wrote:

Let's say that the value of cell A1 was "C:\Work Documents\David's
Folder\Schedule.xls" and I wanted to click a button to run a macro that
open's the file referenced in A1. Is that possible and if so how can it be
done?

The value of A1 would change continually so the macro could not always
reference "C:\Work Documents\David's Folder\Schedule.xls" for example.

Many thanks.
--
David P.



All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com