Raise Error from ActiveX dll to VBA

S

Serge

Ok I am trying to raise my own error upto VBA function from my VB dll like
this:

Err.Number = vbobjecterror + 100
Err.Source = CalculatePL
Err.Description = "Array sizes do not match"
GoTo Err_Handler
..
..
..
Err_Handler:
Err.Raise Err.Number, Err.Source, Err.Description

But! it seems that Excel VBA uses Err.Number to show it's own Err
description, not the one I set. I tried setting Err.Number to all kinds of
values, but I was never able to show my custom description.

Is there a workaround?

Thanks

Serge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top