Error location in VBA

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.
 
A

Albert

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.
 
J

Jacob Skaria

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
 
C

Chip Pearson

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)
 

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