ChDir behavior

H

HC

Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
the new directory is C:\A while on the 8th machine it remains C:\A\B with no
error message.

OS is windows XP SP3. Have reloaded Office 2003 several times with no
change in behavior

Any suggestions as to where to look for glitch?
 
R

Ron de Bruin

Hi HC

Try to use it together with ChDrive

MyPath = "C:\A"
ChDrive MyPath
ChDir MyPath
 
H

HC

Tried it, and got a "path not found" error on the one machine, other machines
work as expected.
 
R

Ron de Bruin

Test if you use the correct Separator in the path

MsgBox Application.PathSeparator
 
H

HC

It appears that a couple of non-print characters or a backspace got into the
directory name corrupting the chdir process. Re-entered the folder name and
all is good.

Thanks Ron for the effort (I'm embarassed - should have checked that sooner)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top