VB EXE Run time error
Posted on 2004-09-27
I have a huge problem using VB5.
I am busy with a fairly large project. It has about 15 forms, 15 modules and a class module in the main app, as well as a timer.dll which I downloaded from the internet, and two activex.exe's which I wrote myself.
The one activex exe handles all communications with the comport and the other handles all database related issues.
I am writing in VB5, running on win2000.
The problem is quite strange. when I run the project in VB's design environment, it runs perfectly every time, and it has run perfectly every time for weeks. However, when I try to run a compiled version (on my own PC or others) it keeps failing with the error: Run time error -2147418107 (80010005) - Automation Error.
The strange thing is that it is not consistent. It fails about 8 or 9 times out of 10, but not always at the same place. I am pretty sure that its not my activex exes, because after the main app has crashed, they still appear to be running. It actually seems like the problem is when they label controls are being loaded on the forms.
The reason I suspect this is because sometimes it gives me the above error, but the the exe doesn't terminate. It then half loads up the form without the labels.
I thought that the problem was maybe with the PC, so I spent the whole weekend copying the code and pasting it to a new project on a different PC. Then I rebuilt all the forms and set their properties, but it still crashes all the time.
This is very frustrating. Does anyone know what is wrong?
PS, when I run a setup program on other PC's, I get the error: access is denied shdocvw.dll
Don't know if this has anything to do with it though because the compiled version won't even run on my PC.
John Mc Murray