Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convenient way to ignore Debug.Assert ?
Dear Excel Gurus,
I put in several Debug.Assert in my code to catch bugs more easily. As I am going to deploy the code soon, is there any convenient way to ignore the Debug statements for the deployment version? Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convenient way to ignore Debug.Assert ?
I put in several Debug.Assert in my code to catch bugs more easily. As I
am going to deploy the code soon, is there any convenient way to ignore the Debug statements for the deployment version? You can use Edit/Replace in the VBA editor to replace them with blank lines. Put this... *debug.assert* in the Find What field, leave the Replace With field blank and put a check mark in the Use Pattern Matching check box. The other possibility if you don't want to lose them completely is to turn them into comments. Again, in Edit/Replace, put this... debug.assert in the Find What field and put this... 'debug.assert (note the leading apostrophe) in the Replace With field. Rick |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convenient way to ignore Debug.Assert ?
You may want to add a public variable that you can toggle.
Public DevelopmentMode as Boolean Then somewhere DevelopmentMode = True Then you could use if developmentMode = true then debug.assert ... End if Who knows if it's worth the effort for this project--but, heck, it may be worth it when you get that first bug, er, enhancement request next week! Sing wrote: Dear Excel Gurus, I put in several Debug.Assert in my code to catch bugs more easily. As I am going to deploy the code soon, is there any convenient way to ignore the Debug statements for the deployment version? Thanks for your help. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DSUM Not Very Convenient | Excel Worksheet Functions | |||
extract data from pivot via vba (Getpivot is not convenient) | Excel Programming | |||
Is there a convenient way to represent latitude/longitude | Excel Discussion (Misc queries) | |||
Looking for a convenient source of VBA expressions | Excel Programming | |||
* How do we debug this? ... | Excel Programming |