Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open file in directory
Hi. The following code will open a file in a specific
directory. After I complete the development of this file, I plan to move it along with the other file to another computer. At this point, I don't know the entire path on the new computer, but I do know that both files will reside in the same directory. How would I rewrite this line so that it will open the file in the same directory as that which the macro file is located? Workbooks.Open Filename:= _ "C:\Documents and Settings\Mike\My Documents\Demos Log file.xls" Thanks, Mike. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open file in directory
Workbooks.Open Filename:= _
ThisWorkbook.Path & "\" & "Demos Log file.xls" -- Regards, Tom Ogilvy "Mike" wrote in message ... Hi. The following code will open a file in a specific directory. After I complete the development of this file, I plan to move it along with the other file to another computer. At this point, I don't know the entire path on the new computer, but I do know that both files will reside in the same directory. How would I rewrite this line so that it will open the file in the same directory as that which the macro file is located? Workbooks.Open Filename:= _ "C:\Documents and Settings\Mike\My Documents\Demos Log file.xls" Thanks, Mike. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open file in directory
Thanks, Tom.
-----Original Message----- Workbooks.Open Filename:= _ ThisWorkbook.Path & "\" & "Demos Log file.xls" -- Regards, Tom Ogilvy "Mike" wrote in message ... Hi. The following code will open a file in a specific directory. After I complete the development of this file, I plan to move it along with the other file to another computer. At this point, I don't know the entire path on the new computer, but I do know that both files will reside in the same directory. How would I rewrite this line so that it will open the file in the same directory as that which the macro file is located? Workbooks.Open Filename:= _ "C:\Documents and Settings\Mike\My Documents\Demos Log file.xls" Thanks, Mike. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I set up an Excel 2007 default directory for a File Open? | Excel Discussion (Misc queries) | |||
open file in current directory | Excel Worksheet Functions | |||
open file in current directory | Excel Discussion (Misc queries) | |||
Excel Slow File Open Directory Response | Excel Discussion (Misc queries) | |||
How to retrieve the directory of the currently open file? | Excel Programming |