|
-
Oct 4th, 2001, 11:29 PM
#1
error messages
I made a simple program for my mom and she installed it no problem and ran it with no problems. now I gave it to my sister and she ran it with no problems. both on win98se. but I gave it to my boss and she ran it on the work computer (win2000) and it runs ok. but when she click on a menu item to open another form she gets an error. the error states
Run-time error '-2147220999 (800401f9)':
Method '~' of object '~' failed.
I included most things in the package when I ran package and development on my vb6. all that form is is a listview that opens a database. it uses jet so I included those dlls and ocx or what ever it takes. so she took it home to her computer (win98se) and installed it and ran it and click on the same menu item and gets another error different from win2k. it reads as follows
class doesn't support automation or expected interface. also it was a run-time error. don't know the numbers.
does anybody have an idea or a source that shows what each error code it or how to fix it.
TIA
-
Oct 4th, 2001, 11:35 PM
#2
-
Oct 4th, 2001, 11:46 PM
#3
Fanatic Member
ps your error was generated by winerror.h and the actaul error message that is associated with that error number is this
-2147220999 (800401F9) Error in the DLL
to actually get vb to decipher the correct error ddescription you need to use the format message api
Format Message API
VB Code:
Option Explicit
Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000
Private Declare Function FormatMessage Lib "kernel32" Alias _
"FormatMessageA" ( ByVal dwFlags As Long, lpSource As Long, _
ByVal dwMessageId As Long, ByVal dwLanguageId As Long, _
ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Any) _
As Long
Private Function MessageText(lCode As Long) As String
Dim sRtrnCode As String
Dim lRet As Long
sRtrnCode = Space$(256)
lRet = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0&, lCode, 0&, _
sRtrnCode, 256&, 0&)
If lRet >0 Then
MessageText = Left(sRtrnCode, lRet)
Else
MessageText = "Error not found."
End If
End Function
hope this has been helpful to you
-
Oct 5th, 2001, 12:56 AM
#4
thank you rudvs2, tha thas been a big help. she had that file but i think it was out of date. I am not sure what version it was.
again thanks for the help. 
oh by the way I used Mdac_typ ver. 2.50.4403.12
-
Oct 5th, 2001, 01:07 AM
#5
actually how do I make it so that function gets used when there is an error. do I do something like
on error MessageText
or something similiar. forgive me as I act stupid here. maybe it is brain farts.
-
Oct 5th, 2001, 01:47 AM
#6
-= B u g S l a y e r =-
something like this:
VB Code:
Private Sub Command1_Click()
On Error GoTo xit
'ur code
'
'
Exit Sub
xit:
MessageText (Err.Number)
End Sub
-
Oct 5th, 2001, 09:39 AM
#7
thanks Peet, I will give that a go.
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
|