debugger doesn't highlight line

B

bigHatNoCattle

I'm developing a VBA macro in basic. I compile the VBA code then
execute it. When I have a run time error a window pops up that says
"runtime error <someNumber> <some error message>" and OK button.
That's great. But what I would like is to also have the debugger
highlight the line that is in error. I've seen other posts that say
the debugger is highlighting the line in error but it's not
hightlighting the line in error for me. Any ideas what I'm doing
wrong? I'm running VBA version 6.0 on windows 2000

thanks

dca
 
L

LenB

I'm not sure of your question but I will try. Are you using Excel VBA
or Visual Basic 6.0 (VB6)? If you are using VB6, which it sounds like
since you say you are compiling, you don't get the debugger when you run
the exe that you compiled to. Is that what you mean? To use the
debugger in VB6, run your form (or main sub) in the development
environment (I think that is what it is called) using F5 or F8. If you
are using Excel VBA, then I am not helping you much. I don't know how
you compile in Excel VBA.

Len
 
B

bigHatNoCattle

Len,

I'm using Excel VBA not Visual Basic. Specifically I open an Excel
spreadsheet, then pull down the Tools menu, select Macro, then select
Visual Basic Editor. Create my subs, compile, run my main sub in
development enviornment.

dca
 
K

Kieran

bigHatNoCattle,

Have a look at your otions settings in VBA.
Specifically the general tab, Error trapping section. Try changing it
to break on all errors.
 
B

bigHatNoCattle

Kieran,

Thank you, thank you, thank you! You fixed my problem. Why the
default is "break on unhandled errors" instead of "break on all errors"
so that the problem I encountered would not have happened, I don't
know.

thanks again.

dca
 

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