M
Mike Mertes
I'm having some trouble with ChDir that I've run across on several previous
occasions.
I'm trying to change the current directory to a shared directory on the
network using it's absolute path.
ChDir "\\Servername\Directory"
It doesn't work. The current directory remains the same.
This network resource is also mapped as "F:\" on most of the computers here
in the office. ChDir works fine if I refer to the network resource as a
drive letter.
ChDir "F:\Directory"
works just fine. However, I can't rely on the network resource being mapped
on all users computers as F, or even being mapped at all for that matter.
I have a feeling it has something to do with the current drive, as ChDir is
described as only changing the directory relative to each drive. That makes
sense. I tried to change the drive to the absolute path of the file server
but it appears ChDrive will only take literal drive letters as arguments and
not computer names or network addresses.
Also, I'm positive that the directory I'm pointing to in the absolute path
is correct as I can use the same string to open a workbook. (workbooks.open
"\\Servername\Directory\workbook.xls")
This is one of those occasions where your (plural,) personal experience can
help! You can't just read about these quirks in a the help file,
unfortuantely. What's with this unusual behaivor? Is it my syntax?
Thanks a lot!
occasions.
I'm trying to change the current directory to a shared directory on the
network using it's absolute path.
ChDir "\\Servername\Directory"
It doesn't work. The current directory remains the same.
This network resource is also mapped as "F:\" on most of the computers here
in the office. ChDir works fine if I refer to the network resource as a
drive letter.
ChDir "F:\Directory"
works just fine. However, I can't rely on the network resource being mapped
on all users computers as F, or even being mapped at all for that matter.
I have a feeling it has something to do with the current drive, as ChDir is
described as only changing the directory relative to each drive. That makes
sense. I tried to change the drive to the absolute path of the file server
but it appears ChDrive will only take literal drive letters as arguments and
not computer names or network addresses.
Also, I'm positive that the directory I'm pointing to in the absolute path
is correct as I can use the same string to open a workbook. (workbooks.open
"\\Servername\Directory\workbook.xls")
This is one of those occasions where your (plural,) personal experience can
help! You can't just read about these quirks in a the help file,
unfortuantely. What's with this unusual behaivor? Is it my syntax?
Thanks a lot!