D Dave Peterson Jul 3, 2007 #2 Relative to what? Maybe... Dim myPath as string dim myPathParent as string mypath = "C:\my documents\excel\test" mypathparent = mypath & "\.." Watch out for that backslash. Include it only one location.
Relative to what? Maybe... Dim myPath as string dim myPathParent as string mypath = "C:\my documents\excel\test" mypathparent = mypath & "\.." Watch out for that backslash. Include it only one location.
C Chip Pearson Jul 4, 2007 #3 It isn't clear what you are trying to accomplish, but you can use "..\" to get a parent folder. E.g., ChDir "C:\Test\Sub1\SubSub1" Debug.Print Dir("..\..\Sub1\Test.txt", vbNormal) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site)
It isn't clear what you are trying to accomplish, but you can use "..\" to get a parent folder. E.g., ChDir "C:\Test\Sub1\SubSub1" Debug.Print Dir("..\..\Sub1\Test.txt", vbNormal) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site)