Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Error location in VBA

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Error location in VBA

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.

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Error location in VBA

Please ignore the below post which was meant for another thread


"Jacob Skaria" wrote:

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Error location in VBA

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)




On Wed, 12 Aug 2009 10:34:01 -0700, Albert
wrote:

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.

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
source location and error message 400 owl527[_3_] Excel Programming 1 October 14th 05 05:03 AM
Changed location of Add-In file--can't be found error goofy11 Excel Programming 2 August 2nd 05 11:34 PM
Execution Error due to file location Jim W[_3_] Excel Programming 1 April 13th 04 01:33 AM
Button Error - Save at location Ravi Sandhu Excel Programming 2 February 5th 04 10:17 PM


All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"