Thread: Undo a Macro?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] kk_oop@yahoo.com is offline
external usenet poster
 
Posts: 4
Default Undo a Macro?

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