Undo a Macro?

  • Thread starter Thread starter kk_oop
  • Start date Start date
K

kk_oop

Hi. I defined a macro that will copy the current row and do a copy
insert. It looks like this:

Sub CopyInsert()

ActiveCell.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False

End Sub

This works well. The problem is that after I run the macro, I can't
undo the changes. It seems to clear the undo buffer. Is there some
code I can include in the macro to enable the command to be undone
after it is run?

Thanks!

Ken
 
Back
Top