ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Raise Error from ActiveX dll to VBA (https://www.excelbanter.com/excel-programming/277795-raise-error-activex-dll-vba.html)

Serge[_2_]

Raise Error from ActiveX dll to VBA
 
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




All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com