Network / run time error

G

Guest

I am running a code that works perfect in my PC but when I transfer it
to a network it gives me Run time Error 5. It stops @ ChDrive.
The path is correct. I can run a Worbooks.Open path+ file name and it opens
w/o a problem.
Why is it not finding the path? Any ideas? The code stops running on the
third line

SaveDriveDir = CurDir
MyPath = Worksheets("Table1").Range("B1")
ChDrive MyPath <<<<<<<<<<<<<<<< here it returns a Run time error 5
ChDir MyPath


Thank you very much.
 
G

Guest

the only thing i see is that there is no path.
I see a file and a range but no path.
why is that?
 
G

Guest

The path is written in cell B1 of Table1 ...
I've also added .Value after ("B1")
Do you see it now?

MyPath = Worksheets("Table1").Range("B1").Value
 
G

Guest

try commeting out hthe chdrive command.
-----Original Message-----
The path is written in cell B1 of Table1 ...
I've also added .Value after ("B1")
Do you see it now?

MyPath = Worksheets("Table1").Range("B1").Value



.
 

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