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
|