Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JGS JGS is offline
external usenet poster
 
Posts: 1
Default VBE Options: Disabling Debug Option on All Errors


Hi All

Excel's VBE (Visual Basic Editor) can be set to break on all errors
when the VBE encounters handled and unhandled errors when running a VBA
Add-in. This then gives the users the option to debug the code. I want
to avoid that if possible and know it is possible to do it because I
have seen Excel Add-ins that dim out the debug option and give the
users only the ability to End not Debug.

One messy option is to progam in the keystrokes to manually set the
VBE's Error-Handling Option to Break on Unhandled Errors." This is
messy and unreliable.

Another option is to remove all errors from the code. In my case, there
are some potential errors in my code but these errors are handled with
"On Error Resume Next" statements. I have them because there are some
VBA functions that I use in my code that are not present in every
version of Excel (eg CalculateFullRebuild). The error handling means I
can use those VBA functions safely knowing the error handling routine
will solve the problem for older versions of Excel. Unfortunately, if
the VBE is set to break on all errors I still have the problem that
users will have the option to debug the code.

Which brings me to the last possible solution that was suggested on
this forum by JE McGimpsey on 19 August 2004 in the following
terms:"Another correct answer is that if you simply close the file and
reopen it, the Debug option will be dimmed and your users will only
have the choice of End." Can anyone shed more light on this solution
and how you implement it?

Thanks

Jeremy


--
JGS
------------------------------------------------------------------------
JGS's Profile: http://www.excelforum.com/member.php...o&userid=29337
View this thread: http://www.excelforum.com/showthread...hreadid=490504

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default VBE Options: Disabling Debug Option on All Errors

I have seen Excel Add-ins that dim out the debug option and give the users
only the ability to End not Debug.


That's likely because the VB project has been password protected under
Tools, Options in the VBE.

--
Jim
"JGS" wrote in message
...

Hi All

Excel's VBE (Visual Basic Editor) can be set to break on all errors
when the VBE encounters handled and unhandled errors when running a VBA
Add-in. This then gives the users the option to debug the code. I want
to avoid that if possible and know it is possible to do it because I
have seen Excel Add-ins that dim out the debug option and give the
users only the ability to End not Debug.

One messy option is to progam in the keystrokes to manually set the
VBE's Error-Handling Option to Break on Unhandled Errors." This is
messy and unreliable.

Another option is to remove all errors from the code. In my case, there
are some potential errors in my code but these errors are handled with
"On Error Resume Next" statements. I have them because there are some
VBA functions that I use in my code that are not present in every
version of Excel (eg CalculateFullRebuild). The error handling means I
can use those VBA functions safely knowing the error handling routine
will solve the problem for older versions of Excel. Unfortunately, if
the VBE is set to break on all errors I still have the problem that
users will have the option to debug the code.

Which brings me to the last possible solution that was suggested on
this forum by JE McGimpsey on 19 August 2004 in the following
terms:"Another correct answer is that if you simply close the file and
reopen it, the Debug option will be dimmed and your users will only
have the choice of End." Can anyone shed more light on this solution
and how you implement it?

Thanks

Jeremy


--
JGS
------------------------------------------------------------------------
JGS's Profile:
http://www.excelforum.com/member.php...o&userid=29337
View this thread: http://www.excelforum.com/showthread...hreadid=490504



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
Disabling Tools/Options setting Jeronimo Excel Discussion (Misc queries) 3 March 22nd 10 05:10 AM
Help on Disabling Save & Print Options Devesh Aggarwal Excel Programming 0 July 22nd 04 09:16 AM
Disabling Menu Options Neil Warwick Excel Programming 1 January 18th 04 10:02 PM
Disabling standart menu options Dusan Excel Programming 3 November 24th 03 11:30 AM
debug errors.... Bruccce Excel Programming 0 July 18th 03 06:04 PM


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

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"