View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default ChDrive error (server path)

Hi Marcotte

Why i don't know.
But you can try ChDirNet

http://www.rondebruin.nl/copy3.htm#select
See example 6

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Marcotte A" wrote in message ...
Thanks Ron. I'm looking at that site right now. Any idea why this code
works for a folder on my machine, but not for one on a network?

myPath = ThisWorkbook.Path
ChDrive myPath '.......... <--- generates error
ChDir myPath

"ThisWorkbook" is in the correct folder on the network. I would think that
"ThisWorkbook.Path" would give me the correct string to pass to ChDrive.

"Ron de Bruin" wrote:

Hi Marcotte

See
http://www.rondebruin.nl/copy3.htm

Every second macro of each example will also work for a network path

--
Regards Ron de Bruin
http://www.rondebruin.nl