How to ascertain path of file in adjacent directory hierarchy

  • Thread starter Thread starter Paul Martin
  • Start date Start date
P

Paul Martin

Hi all

I am wondering what is the best method of ascertaining the path of a
file in an adjacent directory. Using the map below, I wish to
ascertain the path of "Another Workbook" relative to "ThisWorkbook".

PARENT_DIR
_________|________
| |
DIR_1 DIR_2
| |
ThisWorkbook Another Workbook


Any suggestions apppreciated

Paul Martin
Melbourne, Australia
 
Just to clarify

I want to load a ListBox with the filenames in a given directory. In DOS,
the command to ascertain the directory would be:

dir ..\DIR_2

Thanks in advance

Paul Martin
Melbourne, Australia
 
For anyone interested, I have found a solution as follows:

Dim sPath as String

sPath = ThisWorkbook.Path & "\..\DIR_2"

Paul Martin
Melbourne, Australia
 
Back
Top