|
-
Aug 20th, 2012, 01:00 PM
#1
Thread Starter
New Member
Run-time error '-2147417848 (80010108)':
Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients.
What to look for to fix?
-
Aug 20th, 2012, 01:12 PM
#2
Re: Run-time error '-2147417848 (80010108)':
Do you know where in your code it is occuring or what is happening at the time? That's what to look for first.
-
Aug 20th, 2012, 01:16 PM
#3
Thread Starter
New Member
Re: Run-time error '-2147417848 (80010108)':
I am nowing running non-compiled code so i can see where it is when it fails.....
-
Aug 21st, 2012, 04:58 AM
#4
Re: Run-time error '-2147417848 (80010108)':
Post the code and what is failing...
-
Aug 21st, 2012, 05:39 AM
#5
Thread Starter
New Member
Re: Run-time error '-2147417848 (80010108)':
Non-compiled code ran all night with no issues, not sure if it just needs time to fail or only the executable dies.
-
Aug 21st, 2012, 05:57 AM
#6
Re: Run-time error '-2147417848 (80010108)':
 Originally Posted by brian goodwin
Non-compiled code ran all night with no issues, not sure if it just needs time to fail or only the executable dies.
It sounds like you don't have any error handling going on or you would not have this big question mark. I suggest you add some and as long as you are at it do it everywhere. There are a lot of approaches but here is one I use:
Code:
Private Sub Command1_Click()
10 On Error GoTo ErrorHandler
Dim x As Long
20 Debug.Print ("Line of code for demonstation of executable statements")
30 Debug.Print ("Line of code for demonstation of executable statements")
40 Debug.Print ("Line of code for demonstation of executable statements")
50 Debug.Print ("Line of code for demonstation of executable statements")
60 x = x \ 0
70 exit sub
ErrorHandler:
MsgBox "Error occured in form1 - Command1_Click - line " & Erl & vbCrLf & _
"Error Details: " & Err.Number & " " & Err.Description
End Sub
1. At the top of each procedure add the "on error goto ErrorHandler"
2. At the bottom add the error handler.
3. Include the "Exit sub" so the code does not fall into the error handler.
4. Get MZTools from here. It is free. http://www.mztools.com/v3/download.aspx
5. There is an option to add line numbers to your project all at once. It will also remove them if you don't like them.
Then when your code hits a run time error it will display:
1. The routine where it happened.
2. The line number where it occured.
3. The error messgae.
It is up front work but it will save you lots of headaches down the road.
Some people take different actions in the error hander routines like logging to a file pertinamt information. With my approach it is more basic but you would not be guessing like you are now.
-
Aug 21st, 2012, 08:31 PM
#7
Frenzied Member
Re: Run-time error '-2147417848 (80010108)':
yes, i also agreed with Tyson .you need to use error Handler at each of your Method and Functions .
-
Aug 22nd, 2012, 05:30 AM
#8
Thread Starter
New Member
Re: Run-time error '-2147417848 (80010108)':
The whole code seems to be unstable? The program crashes just fooling around with the ide version. Is there a way to re-create the frmmain.frm file? Is there a way that this file can get corrupt? I can put all this error handling in but if it is unstable as an ide version I don't think it will tell me anything?
-
Aug 22nd, 2012, 05:38 AM
#9
Frenzied Member
Re: Run-time error '-2147417848 (80010108)':
as i have been seen . you did not post any code till now . better if you will post some of the code .we will give more
useful suggestion .
-
Aug 22nd, 2012, 06:23 AM
#10
Re: Run-time error '-2147417848 (80010108)':
You aren't helping yourself by not providing information for us to help you.
1. The whole code seems to be unstable?
What's that supposed to mean?
2. The program crashes just fooling around with the ide version.
What's that supposed to mean?
Look at it this way. If I walked up to your desk and said "The whole code seems to be unstable? The program crashes just fooling around with the ide version." what would you ask me?
You would probaby also say "show me what you mean". Tell us and show us what you mean.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|