Can't enter break mode at this time message

T

Theodore_MH

Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I'm trying to step through some simple code in a macro using the VB Editor step into command. I have a statement in the macro:

Sheets("DATA").Move _
Before:=Workbooks("Test.xls").Sheets(1)

For some reason, this causes the Can't enter break mode message to pop up. I can Continue, End or Help in the Popup. Continue finishes the macro, but doesn't let me step through the remaining statements. All the stuff I've found at google talks about ActiveX controls and extensibility add-in object model. I'm not using any forms or controls in the workbook, so I can't imaging why this is happening. If I step through the same code on Excel 2007 it works just fine--no can't enter break mode message.
Any suggestions?
 
B

Bob Greenblatt

Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I'm
trying to step through some simple code in a macro using the VB Editor step
into command. I have a statement in the macro:

Sheets("DATA").Move _
Before:=Workbooks("Test.xls").Sheets(1)

For some reason, this causes the Can't enter break mode message to pop up. I
can Continue, End or Help in the Popup. Continue finishes the macro, but
doesn't let me step through the remaining statements. All the stuff I've
found at google talks about ActiveX controls and extensibility add-in object
model. I'm not using any forms or controls in the workbook, so I can't
imaging why this is happening. If I step through the same code on Excel 2007
it works just fine--no can't enter break mode message.
Any suggestions?
What happens if the statement is on a single line?
 
T

Theodore_MH

Hi Bob,

Actually, the statement is on just one line. I broke it in the post so it fit in the text box.

Curiously, I found a sort-of workaround for the problem. If I do not require declared variables in the Visual Basic editor preferences, the problem does not occur. I can't figure how that has anything to do with the problem, but I tested a bunch and when that preference checkbox is checked I get the problem. Checkbox cleared, no problem.

Now I just have to turn off required variables before I step through a program, then turn them back on when I'm doing other stuff.

Thanks for your reply.
 
J

John McGhie

That usually means you have a spelling mistake somewhere (else!) in the code
module :)

Cheers


Hi Bob,

Actually, the statement is on just one line. I broke it in the post so it fit
in the text box.

Curiously, I found a sort-of workaround for the problem. If I do not require
declared variables in the Visual Basic editor preferences, the problem does
not occur. I can't figure how that has anything to do with the problem, but I
tested a bunch and when that preference checkbox is checked I get the problem.
Checkbox cleared, no problem.

Now I just have to turn off required variables before I step through a
program, then turn them back on when I'm doing other stuff.

Thanks for your reply.

--

The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:[email protected]
 

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