XL2003 VBA: Debuging...can not break or run in break/step mode.

C

Conan Kelly

Hello all,

Something got jacked up on my system last night. I was trying to Break
([Ctrl] + [Pause/Break]) into some long running code so I could step through
it. I also set up "Break When Value Is True" watch as well. When I tried
to break into the code, I was expecting to see the dialog box with the "End"
& "Debug" buttons on it, but nothing....maybe the VBE & XL went into a temp
"Not Responding" state, but recovered. After code is finished
running/recovered from temp "Not Responding", all of the open XL files can
be closed and saved, but XL can't be closed. I get a message box that pops
up...something almost exactly like this:

MsgBox("Cannot quit Microsoft Office Excel.", vbInformation + vbOKOnly,
"Microsoft Excel")

....except that I get that generic .exe/"Not Responding" icon before "MS XL"
in the title bar.

Maybe I should mention too, I'm working with a TextStream object connecting
to a large text file. The TextStream gets closed in the code at the end.

Right now if I close everything and kill the XL process in Task Manager,
then open up a fresh XL instance and the file I'm working on, I can start
the sub procedure I'm working on in break/step mode by hitting [F8]. After
hitting [F5] to continue normally, it looks like I can break into the code
normally (only on the first time through) up until my "Break When Value Is
True" watch should be triggered. My break watch does not get triggered
ever, and after that, [F8] won't start step/break mode, it just runs the
code (acts like [F5]). [Ctrl] + [Pause/Break] won't break into the code, it
acts like Stop/Reset.

After the first time through, the code appears to be running normally with
[F5] or [F8], I just can't break into it and step through it.

Does anyone know what is going on here?

Thanks for any help anyone can provide,

Conan Kelly
 
J

Joel

I somertimes find that I have to break on the worksheet page as well as the
VBA page to get excel to stop. A large worksheet will take time to perform
the updates and you have to stop these updates as well. If you had screen
updates disabled after you stop VBA the screen updates has to complete
before you would of gotten a response.
 

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