View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dove Dove is offline
external usenet poster
 
Posts: 25
Default Code to look at all sheets not just specified sheet ?

Corey,

The only time that I mess with documents on a network folder is when I
already have the network share mapped to a drive letter through the OS. If
you map the drive through the OS, check the box to restore the connection
upon reboot it will always have the same drive letter. Then, you can use
the path of "X:\.....\my documents\folder name", eliminate the ChDrive line
and the ChDir will work fine. (Changing the X:\... to the drive letter and
any higher level folders before the "My Documents")

I haven't messed with the ChDrive action before, but it could also be
causing an error since you are giving it a path instead of a drive letter,
and if it isn't already mapped, it could be looking for the
username/password for the network share.

David

"Corey" wrote in message
...
Thanks David for the reply.

I can seem to get the code to work great if i set it to a local
folder,(Did this to test and setup)
But as i need it to look to a folder on a network as:
MyPath = "\\Office2\my documents\folder name"
ChDrive MyPath
ChDir MyPath

I get an error in the ChDrive My Path
and ChDir My Path

Any idea's whay that is ?
And how to rectify it.
Corey....

Regards

Corey McConnell