CurDir does not change the working folder, only ChDrive/ChDir does. Not
sure what your example is supposed to prove, other than the second
messagebox has the same value as the first one but with \foo appended.
--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------
"Lance" <Lb******@yahoo.com> wrote in message
news:Cw*******************@newsb.telia.net...
: Hi All,
:
: I change the current directory in a proc, using CurDir(). The change
: persists across executions. I would like the CurDir() return value to be
the
: same at the start of each execution. Any suggestions will be appreciated.
: The code below illustrates the problem. Thanks.
:
: Dim currentDir As String
: MsgBox CurDir()
:
: currentDir = CurDir() + "\foo"
:
: MsgBox currentDir
:
: ChDir (currentDir )
:
:
:
: