ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Break Mode (https://www.excelbanter.com/excel-programming/402241-break-mode.html)

FARAZ QURESHI

Break Mode
 
While executing the following code I am getting a message
"CANT EXECUTIVE CODE IN A BREAK MODE"

Sub FARAZCUT()
On Error GoTo ErrorHandler
Range("A4").End(xlDown).Select
ActiveCell.Offset(1, 0).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Exit Sub ' Exit to avoid handler.
ErrorHandler:
MsgBox "Copy Something First!"
End Sub

What might be the reason?

Bill Renaud

Break Mode
 
You mean:
"Can't execute code in break mode"

This is correct. While you have a breakpoint set and you are
single-stepping through that code, you cannot run another macro.

You need to finish single-stepping through the code where the breakpoint
is, then set a new breakpoint somewhere else and start debugging that code.

--
Regards,
Bill Renaud





All times are GMT +1. The time now is 09:21 AM.

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