Why won't program run? 
Author Message
 Why won't program run?

I have an interesting problem. I've got a program written in vb4 ee and
compiled to an EXE. I loaded on the client's machine which has vb4.0 Pro.

When I try and run it on his machine it bombs out with a runtime error 91
variable or with block not set.
When I run the same exact program from another workstation on the network
(accessing it from his HDD) the program runs fine. When I step through it
in the de{*filter*} on his machine it chokes in this section of code.

Function GetAppPath() As String
    Dim Path$

    Path$ = App.Path
    If Right$(Path$, 1) <> "\" Then Path$ = Path$ + "\"
    GetAppPath = Path$
End Function

It seems to have a problem with the Right$ variable. Why would this happen
on one machine that had Vb4 pro vs. VB4 EE?

Any help would be appreicated

Craig



Sun, 25 Jul 1999 03:00:00 GMT  
 Why won't program run?

This may or may not solve your problem, but it feels relevant.

I've noticed when I try pulling a item such as a path from the system that
I am unable to add anything to the string.  Like A$+B$, or A$ & B$ or A$ &
"jhfdsfkjsh" or otherwise.  

I found out, after losing much hair, that there is an extra character that
was at the end of the string I pulled from the system.  I solved the
problem with a line similar to A$=right$(A$, len(A$)-1).  That extra
character would prevent anything from being tacked onto the end of it.

Will that put you on the right track?  I hope so.

da

Quote:
> When I try and run it on his machine it bombs out with a runtime error 91
> variable or with block not set.
> When I run the same exact program from another workstation on the network
> (accessing it from his HDD) the program runs fine. When I step through it
> in the de{*filter*} on his machine it chokes in this section of code.

> Function GetAppPath() As String
>     Dim Path$

>     Path$ = App.Path
>     If Right$(Path$, 1) <> "\" Then Path$ = Path$ + "\"
>     GetAppPath = Path$
> End Function

> It seems to have a problem with the Right$ variable. Why would this
happen
> on one machine that had Vb4 pro vs. VB4 EE?



Sun, 25 Jul 1999 03:00:00 GMT  
 Why won't program run?

Thanks David I'll give it a try.

Craig



Quote:
> This may or may not solve your problem, but it feels relevant.

> I've noticed when I try pulling a item such as a path from the system
that
> I am unable to add anything to the string.  Like A$+B$, or A$ & B$ or A$
&
> "jhfdsfkjsh" or otherwise.  

> I found out, after losing much hair, that there is an extra character
that
> was at the end of the string I pulled from the system.  I solved the
> problem with a line similar to A$=right$(A$, len(A$)-1).  That extra
> character would prevent anything from being tacked onto the end of it.

> Will that put you on the right track?  I hope so.

> da

> > When I try and run it on his machine it bombs out with a runtime error
91
> > variable or with block not set.
> > When I run the same exact program from another workstation on the
network
> > (accessing it from his HDD) the program runs fine. When I step through
it
> > in the de{*filter*} on his machine it chokes in this section of code.

> > Function GetAppPath() As String
> >     Dim Path$

> >     Path$ = App.Path
> >     If Right$(Path$, 1) <> "\" Then Path$ = Path$ + "\"
> >     GetAppPath = Path$
> > End Function

> > It seems to have a problem with the Right$ variable. Why would this
> happen
> > on one machine that had Vb4 pro vs. VB4 EE?



Sun, 25 Jul 1999 03:00:00 GMT  
 Why won't program run?

Craig

Some questions come to my mind. Maybe these will give a clue.

1. How are you installing the program on the user's machine ? If you are
using VB4's installation procedure ( or any third party installation
program ), then ignore this question.

But if you are simply copying the EXE on that user's machine, that may be a
reason why program is crashing. This occurs due to incompatibility among
the plethora of versions of DLLs floating around.

Also, RDO is available only with VB4.0 EE, so that may be a problem. Try
copying MSRDO32.DLL to that machine.

2. Does the another workstation ( where the program runs successfully )
have VB4.0 EE or VB4.0 Pro ? Since you mentioned that you are accessing the
HDD of the first workstation, I am ready to bet that the second workstation
has VB4.0 EE installed. Otherwise program would not run at all. Program is
finding all the necessary DLLs locally, although the EXE is coming from
first workstation.

My guess is that there is nothing in the code.

Hope this helps.

Regards.

Rahul



Mon, 26 Jul 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Why won't program run?

2. Why a compiled executable won't run on client's machine

3. Why Won't my ActiveX Control run(Sometimes)

4. why my program can't run ?

5. Template Programming Won't Run From Shortcut

6. VB3 program won't run as EXE

7. Program won't run on NT

8. My programs won't stop running!

9. Win98 program won't run on a WIn95 machine

10. Help - Compiled program won't run

11. 32-Bit programs won't run

12. VB3 program won't run as EXE

 

 
Powered by phpBB® Forum Software