PC Review
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Crashes
Network / run time error
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Crashes
Network / run time error
![]() |
Network / run time error |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
the only thing i see is that there is no path.
I see a file and a range but no path. why is that? >-----Original Message----- >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. > > >. > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 > > ChDrive MyPath "anonymous@discussions.microsoft.com" wrote: > the only thing i see is that there is no path. > I see a file and a range but no path. > why is that? > > >-----Original Message----- > >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. > > > > > >. > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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 >> > ChDrive MyPath > > >"anonymous@discussions.microsoft.com" wrote: > >> the only thing i see is that there is no path. >> I see a file and a range but no path. >> why is that? >> >> >-----Original Message----- >> >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. >> > >> > >> >. >> > >> >. > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
I had already done that and it runs perfect but using the c:\ drive
"NA" wrote: > 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 > > > ChDrive MyPath > > > "anonymous@discussions.microsoft.com" wrote: > > > the only thing i see is that there is no path. > > I see a file and a range but no path. > > why is that? > > > > >-----Original Message----- > > >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. > > > > > > > > >. > > > > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
I did it and it run perfect but using the c:\ drive
"anonymous@discussions.microsoft.com" wrote: > 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 > >> > ChDrive MyPath > > > > > >"anonymous@discussions.microsoft.com" wrote: > > > >> the only thing i see is that there is no path. > >> I see a file and a range but no path. > >> why is that? > >> > >> >-----Original Message----- > >> >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. > >> > > >> > > >> >. > >> > > >> > >. > > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
It was a mapping problem. It's working fine now. Thanks "anonymous@discussions.microsoft.com" wrote: > 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 > >> > ChDrive MyPath > > > > > >"anonymous@discussions.microsoft.com" wrote: > > > >> the only thing i see is that there is no path. > >> I see a file and a range but no path. > >> why is that? > >> > >> >-----Original Message----- > >> >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. > >> > > >> > > >> >. > >> > > >> > >. > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

