PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Crashes Network / run time error

Reply

Network / run time error

 
Thread Tools Rate Thread
Old 13-11-2004, 09:29 PM   #1
=?Utf-8?B?TkE=?=
Guest
 
Posts: n/a
Default Network / run time error


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.


  Reply With Quote
Old 15-11-2004, 03:39 PM   #2
Guest
 
Posts: n/a
Default Network / run time error

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.
>
>
>.
>

  Reply With Quote
Old 15-11-2004, 06:09 PM   #3
=?Utf-8?B?TkE=?=
Guest
 
Posts: n/a
Default RE: Network / run time error

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.
> >
> >
> >.
> >

>

  Reply With Quote
Old 15-11-2004, 08:38 PM   #4
Guest
 
Posts: n/a
Default RE: Network / run time error

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.
>> >
>> >
>> >.
>> >

>>

>.
>

  Reply With Quote
Old 16-11-2004, 03:52 PM   #5
=?Utf-8?B?TkE=?=
Guest
 
Posts: n/a
Default RE: Network / run time error

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.
> > >
> > >
> > >.
> > >

> >

  Reply With Quote
Old 16-11-2004, 03:53 PM   #6
=?Utf-8?B?TkE=?=
Guest
 
Posts: n/a
Default RE: Network / run time error

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.
> >> >
> >> >
> >> >.
> >> >
> >>

> >.
> >

>

  Reply With Quote
Old 17-11-2004, 12:25 AM   #7
=?Utf-8?B?TkE=?=
Guest
 
Posts: n/a
Default RE: Network / run time error


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.
> >> >
> >> >
> >> >.
> >> >
> >>

> >.
> >

>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off