Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to change the current subdirectory to the one that is one level higher
and contains the string "Russell". I know how to change the directory to one level higher (ChDir ".."). How can I loop through the subdirectories to find the one containing the word "Russell"? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Let us know if this helps.
Sub finddir() Dim mypath, myname mypath = "c:\yourfolder\" myname = Dir(mypath, vbDirectory) Do While myname < "" If myname = "yourname" Then ChDir "c:\personal\yourname": Exit Sub myname = Dir Loop End Sub -- Don Guillett SalesAid Software "Stratuser" wrote in message ... I want to change the current subdirectory to the one that is one level higher and contains the string "Russell". I know how to change the directory to one level higher (ChDir ".."). How can I loop through the subdirectories to find the one containing the word "Russell"? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find the correct sum | Excel Worksheet Functions | |||
find the correct sum | Excel Discussion (Misc queries) | |||
How to find the correct end date | Excel Worksheet Functions | |||
Can you please hel me to find the correct formulas | Excel Worksheet Functions | |||
Can't Find Correct Value | Excel Programming |