D
Dennis
Using XL 2003 & 97
If I use:
Workbooks.Open(FileName:="myFile.xls")
The file is not found
But if I use:
Workbooks.Open(FileName:="C:\Excel Files\myFile.xls")
The world is beautiful.
Even though this makes sense, I would like to have VBA code that assumes the
path to the file:
1) that I wish to open next is,
2) in the same path as my active file.
(I know that I could hard code it but I would like smart VBA code which
looks for the second file in the same directory as the file that I have
active - no matter what the directory path)
What is the best way to write that VBA code?
TIA Dennis
If I use:
Workbooks.Open(FileName:="myFile.xls")
The file is not found
But if I use:
Workbooks.Open(FileName:="C:\Excel Files\myFile.xls")
The world is beautiful.
Even though this makes sense, I would like to have VBA code that assumes the
path to the file:
1) that I wish to open next is,
2) in the same path as my active file.
(I know that I could hard code it but I would like smart VBA code which
looks for the second file in the same directory as the file that I have
active - no matter what the directory path)
What is the best way to write that VBA code?
TIA Dennis