View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Error location in VBA

You can use SUMPRODUCT() to sum

To sum c based on conditions in A and B

=SUMPRODUCT(--(A1:A10=D1),--(B1:B10=D2),C1:C10)

If this post helps click Yes
---------------
Jacob Skaria


"Albert" wrote:

Hi!
I have a few users who work with an Excel Addin I created.
For security purposes I have Password-Locked the project so the users can't
access the code.

However, an error arises now and then, and It's hard for me to debug
sometimes because I can't tell where the error occured.

I would like it if when an error arises, insted of showing the "Run-Time
error" dialog, it shows a msgbox displaying a custom message and the location
of the error (Module / Line), but still without opening access to the project
itself.

Is this possible? Any suggestions greatly appreciated.

Best regards,

Albert C.