Break Modes

T

Tod

I have a workbook that has the statement:

On Error Resume Next

So I have break mode set to break on unhandled errors.
However, when I am developing I like break mode to be
in 'break on all errors' so it will display the error,
show me the statement where it occured and go into break
mode.

If I forget to change the break mode back before I quit,
the next time that workbook opens it will give an error.
Is there a way to somehow be reminded that I'm in 'break
on all errors' mode so I can set it back? Other ideas?

tod
 
J

John Wilson

Tod,

Not an answer to your question but an idea for development.

I'm working on "live" workbooks in an office and am constantly
modifying things that I don't want the users to be bothered with
until I'm done.

In almost all of them I set a public flag.
Public ItsMe as Boolean

In the Workbook_Open Event,

If Application.UserName = "John Wilson" Then
ItsMe = True
End If

Then while I'm working on a new feature, I can use
If ItsMe <> True then Exit Sub

or.....
If ItsMe = True Then
' my code under test
Else
' original code
End If

When I'm satisfied that everythings working well and I want to
turn on the new feature, I just delete those lines of code.

You could do the same for your break mode statement.

John
 

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