Network / run time error

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
the only thing i see is that there is no path.
I see a file and a range but no path.
why is that?
 
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
 
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



.
 
Back
Top