I have just moved to excel 2010, have discovered surprising behaviour when stepping through code. When stepping through code it often throws the error Can't execute code in break mode
.
An example VBA
script follows:
Sub nm()
Sheets("Winput").Select
Range("A10").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveSheet.Previous.Select
end Sub
The error are not thrown on Sheets("Winput").Select
or Selection.Copy
, but are thrown on all other lines. The code runs fine when i trigger the macro.
thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…