VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to fix a run-time error

12 REPLIES 12
Reply
Message 1 of 13
Anonymous
236 Views, 12 Replies

How to fix a run-time error

Hi all,

I wrote a program with Visual Basic version 5 Professional on a system with
Windows 98. It runs fine there but when I load the executable on a system
with Windows ME, it fails.

The opening dialog (a menu) loads, and even the linked dialog that solicits
data. But when I press the command button to do the calculations, I get the
following error:

Run-time error '50003': Unexpected error

This really is an unexpected error to me. Any suggestions or advise on how
to fix? Also, what does this error mean?

Thanks so much for everybody's support on this newsgroup.

Sal
12 REPLIES 12
Message 2 of 13
Ed.Jobe
in reply to: Anonymous

Could be anything. If you have an idea where in your code the problem is, try setting a breakpoint and running the app and then stepping through the code one line at a time until you get the error. Otherwise, set your options to 'break on all errors' and run the app and it should break to the debugger on the offending code. Remember to reset your options when you are done debugging.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 13
Anonymous
in reply to: Anonymous

Hi Ed and thanks for the quick
response,

 

I actually have the VB developers software on my
home computer where the executable runs fine. The problem is on a computer at
work with Windows ME, where there is no developers software, only the
executable. I suppose i could try to load the developers software at work (if ME
supports VB5pro?) and proceed as you suggest and that thought actually crossed
my mind. But if there is a simpler way, i would rather persue it
first.

 

The system with Windows ME is on a station where i
work and not a station i can sit at for any debugging. I was wondering if there
is a compatibility issue between the two OS's? I'm running Win98 at home where
the executable runs fine.

 

One final question, which i could check on my own
but in case anyone knows. Can i set 'something' prior to compiling into and
executable, that will tell me which line the error is on, even if the developers
software is not loaded where the exe is being run? I'm thinking something like a
error-checker that will display the guilty line in a dialog box before
bailing?

 

Thanks again,

Sal


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Could
be anything. If you have an idea where in your code the problem is, try
setting a breakpoint and running the app and then stepping through the code
one line at a time until you get the error. Otherwise, set your options to
'break on all errors' and run the app and it should break to the debugger on
the offending code. Remember to reset your options when you are done
debugging.
Message 4 of 13
Anonymous
in reply to: Anonymous

it sounds like you don't have a certain .ocx/.dll
file on the ME machine.  do you have any controls on your form other than
the normal button, label, combobox, etc.?

my 2¢

 

Rob
--
W2k, A2K2, VB6, VB.NET


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Hi Ed and thanks for the quick
response,

 

I actually have the VB developers software on my
home computer where the executable runs fine. The problem is on a computer at
work with Windows ME, where there is no developers software, only the
executable. I suppose i could try to load the developers software at work (if
ME supports VB5pro?) and proceed as you suggest and that thought actually
crossed my mind. But if there is a simpler way, i would rather persue it
first.

 

The system with Windows ME is on a station where
i work and not a station i can sit at for any debugging. I was wondering if
there is a compatibility issue between the two OS's? I'm running Win98 at home
where the executable runs fine.

 

One final question, which i could check on my own
but in case anyone knows. Can i set 'something' prior to compiling into and
executable, that will tell me which line the error is on, even if the
developers software is not loaded where the exe is being run? I'm thinking
something like a error-checker that will display the guilty line in a dialog
box before bailing?

 

Thanks again,

Sal


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Could
be anything. If you have an idea where in your code the problem is, try
setting a breakpoint and running the app and then stepping through the code
one line at a time until you get the error. Otherwise, set your options to
'break on all errors' and run the app and it should break to the debugger on
the offending code. Remember to reset your options when you are done
debugging.
Message 5 of 13
Anonymous
in reply to: Anonymous

Hi Sal,

Have you tried the "Packaging and Deployment" wizard in VB5? It will bundle
all of the dependancies that may not be present on the offending machine.

Gary
Message 6 of 13
Anonymous
in reply to: Anonymous

Hi Rob,

 

I am using only the standard controls. I'm not good
enough yet to get fancy.

 

How do i know which .ocx/.dll files i need on the
ME machine? Where do i get them and can i just copy them to ME?

 

Thanks for your help

Sal

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

it sounds like you don't have a certain .ocx/.dll
file on the ME machine.  do you have any controls on your form other than
the normal button, label, combobox, etc.?

my 2¢

 

Rob
--
W2k, A2K2, VB6,
VB.NET
Message 7 of 13
Anonymous
in reply to: Anonymous

Hi Gary,

I was/am not aware of the "Packaging and Deployment" wizard in VB5. I will
certainly look into that and let you know.

Thanks,
Sal


"Gary McMaster" wrote in message
news:7A60D75D219EC65E04A235A13333C955@in.WebX.maYIadrTaRb...
> Hi Sal,
>
> Have you tried the "Packaging and Deployment" wizard in VB5? It will
bundle
> all of the dependancies that may not be present on the offending machine.
>
> Gary
>
>
Message 8 of 13
Anonymous
in reply to: Anonymous

I'm using VB6, but I think its in the same place in VB5. That should be in
the VB5 tools sub menu.

It may look a little intimidating the first time you try it. As I recall, I
accepted all the defaults the first time I tried it and it created a set-up
program that worked fine.

Gary
Message 9 of 13
Anonymous
in reply to: Anonymous

Good morning Gary,

I looked last night but could not find a "Packaging and Deployment" wizard
in VB5. I looked in all the pull-downs and even tried searching help for
"packaging". Are you sure VB5 has this feature?

Sal


"Gary McMaster" wrote in message
news:9BA6828B117B5A44A72A0EC0B862F444@in.WebX.maYIadrTaRb...
> I'm using VB6, but I think its in the same place in VB5. That should be in
> the VB5 tools sub menu.
>
> It may look a little intimidating the first time you try it. As I recall,
I
> accepted all the defaults the first time I tried it and it created a
set-up
> program that worked fine.
>
> Gary
>
>
>
Message 10 of 13
Anonymous
in reply to: Anonymous

>Are you sure VB5 has this feature?

My copy of VB5 Pro had it. So does VB6 Pro.

Mine is in theWindows menu system. Start>Programs>Microsoft Visual Basic
6.0>Microsoft Visual Basic 6.0 Tools> ...

As I recall it was the same in VB5.

Did you do a "custom" or "typical" install instead of a "full" install?

Gary
Message 11 of 13
Anonymous
in reply to: Anonymous

Thanks Gary, i didn't think to look there. I thought you meant the Tools
pull-down. I will check again tonight and i'm sure it is where you say since
i DID a 'full' install.

Thanks for you patience,
Sal

"Gary McMaster" wrote in message

> Mine is in theWindows menu system. Start>Programs>Microsoft Visual Basic
> 6.0>Microsoft Visual Basic 6.0 Tools> ...
>
> As I recall it was the same in VB5.
>
> Did you do a "custom" or "typical" install instead of a "full" install?
>
> Gary
>
>
>
Message 12 of 13
Anonymous
in reply to: Anonymous

Gary, you da MAN!

I found the "Packaging and Deployment" wizard just where you said. I
"packaged and deployed", also as you said, and voila, *it works*.

Thanks so much for the solution to my problem, but also for the education. I
recognize that I have a long way to go, but hope that I can one day pass on
your "attitude of assistance" to fellow coders.

Sal

"Gary McMaster" wrote in message
news:565DEC6D3102E038DA57DCD8DD849356@in.WebX.maYIadrTaRb...
> >Are you sure VB5 has this feature?
>
> My copy of VB5 Pro had it. So does VB6 Pro.
>
> Mine is in theWindows menu system. Start>Programs>Microsoft Visual Basic
> 6.0>Microsoft Visual Basic 6.0 Tools> ...
>
> As I recall it was the same in VB5.
>
> Did you do a "custom" or "typical" install instead of a "full" install?
>
> Gary
>
>
>
Message 13 of 13
Anonymous
in reply to: Anonymous

Your welcome. I'm glad I could help.

There can be legal issues in using this wizard. You may have seen the
warning when you ran it. You may have to obtain permission to distribute
certain controls.

Gary

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost