MartinLiss, you absolutely understand my problem correctly. I'm trying to pull out the error that is generated from my GetRPData sub which is in .dll file on the server, and then my calling Form which is a client program is on the client side. Well, if you add err.clear, the user-defined error will be gone. Therefore, this solution can't solve the problem. Moreover, I can't use msgbox as well because, as I mention above, this class is running on the server side. Thus, that message box will never been seen by the client side.

Ok, let me explain what I'm understanding about err.raise method. As my example code, if this statement is executed, on the calling program, the on error goto errHandler should be worked immediately. Am I right? But in my program, when this situation happens, the calling program still ran to the next statement instead of going to error trap.

What do I miss here?