Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I specify a relative path in vba, to assign to a variable?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. Perico wrote: How do I specify a relative path in vba, to assign to a variable? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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) "Perico" wrote in message ... How do I specify a relative path in vba, to assign to a variable? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Relative Path to a Folder | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions | |||
Relative path | Excel Programming | |||
SaveAs and relative path | Excel Programming | |||
relative path. | Excel Programming |