Error location in VBA

  • Thread starter Thread starter Albert
  • Start date Start date
A

Albert

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.
 
Forgot to mention.

I know about "Erl", but it only works if you have your code line-numbered.
Is there a way to display de line # displayed on the vb editor's Standard
Toolbar?

Thanks in advance.
 
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
 
There is nothing native in VBA to include line numbers. However, I
believe that MZTools will do this for you. Google for MZTools.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Back
Top