ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox cancels "Step Into" Mode! (https://www.excelbanter.com/excel-programming/381094-msgbox-cancels-step-into-mode.html)

Kip Martin

MsgBox cancels "Step Into" Mode!
 
I don't get it. I am just trying to debug a macro. So I press F8 to initiate
the "Debug - Step Into" mode, and everything is working as expected until I
hit a MsgBox statement that just displays a message and an OK button. As
soon as I press the OK button, VBA seems to 'forget' that I was in Step Mode
and just takes off and runs the rest of the macro. Anyone have any idea what
could cause this?





eAlchemist

MsgBox cancels "Step Into" Mode!
 
Put a break point (click on the left margin or right
click-Toggle-Breakpoint) on the line after the Msgbox line

--
Chris Farkas
Excel/Access Developer
http://www.eAlchemy.biz


"Kip Martin" wrote:

I don't get it. I am just trying to debug a macro. So I press F8 to initiate
the "Debug - Step Into" mode, and everything is working as expected until I
hit a MsgBox statement that just displays a message and an OK button. As
soon as I press the OK button, VBA seems to 'forget' that I was in Step Mode
and just takes off and runs the rest of the macro. Anyone have any idea what
could cause this?






Chip Pearson

MsgBox cancels "Step Into" Mode!
 
I've never heard of that before, but the first thing I would do would be to
use Rob Bovey's Code Cleaner add-in to purge VBA's own code storage and
recreate it from scratch. You can get Rob's Code Cleaner at
http://www.appspro.com/Utilities/CodeCleaner.htm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"Kip Martin" wrote in message
...
I don't get it. I am just trying to debug a macro. So I press F8 to
initiate the "Debug - Step Into" mode, and everything is working as
expected until I hit a MsgBox statement that just displays a message and an
OK button. As soon as I press the OK button, VBA seems to 'forget' that I
was in Step Mode and just takes off and runs the rest of the macro. Anyone
have any idea what could cause this?







All times are GMT +1. The time now is 03:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com