S
shanebgross
I have a very simple macro below which cuts and pastes contents of one cell,
then deletes a few columns. When running the macro I get the "Code execution
has been interrupted" error. I can simply hit continue and the macro
completes fine. Sometimes it goes all the way through. When it does break,
it's not always at the same point. The macro was recorded using the "Record
New Macro" menu functions and hasn't been altered. Any ideas why this might
happen?
Sub Macro1()
Range("Q8").Select
Selection.Cut
Range("R8").Select
ActiveSheet.Paste
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
End Sub
then deletes a few columns. When running the macro I get the "Code execution
has been interrupted" error. I can simply hit continue and the macro
completes fine. Sometimes it goes all the way through. When it does break,
it's not always at the same point. The macro was recorded using the "Record
New Macro" menu functions and hasn't been altered. Any ideas why this might
happen?
Sub Macro1()
Range("Q8").Select
Selection.Cut
Range("R8").Select
ActiveSheet.Paste
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
End Sub