Getting Err.Description

neoartz237

Tensai
Local time
Today, 05:07
Joined
Feb 12, 2007
Messages
65
I made an error Catching function where in I take all the err.numbers and output their respective descriptions.

Problem is, I cant seem to pass my parameter into another error variable.

I've tried:

Dim dError as Error

dError = <the passed error number>

so like:

Dim dErrorCatcher(errNum as String)
dError.Number = errNum
MsgBox dError.Description

BUt it sez, Invalid Parameter passing..... something, (My OS's is Japanese, even my Office :(, damn japs wont let me install English versions )

I've tried

Set dError = errNum
Set dError = new Error

even this

Dim ss As Error
Set ss = Error$("-2147467259")
MsgBox ss.Description


Please Help me anyone please :)
 
Oh umm I already figured it out HAHAHA

It seems that you can actually make an ErrObject here, hence I can do:

public sub errHandler(byval aa as errorobject)
msgbox aa.description
end sub


ANd I can call it by:

on error goto die

code
.
.
.

die:
errhandler err


It worked YAY!! thanks anyway
 

Users who are viewing this thread

Back
Top Bottom