Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Undo a Macro?

Hi Ken,

See John Walkenbach at:

http://www.j-walk.com/ss/excel/tips/tip23.htm


---
Regards,
Norman


wrote in message
ps.com...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
use macro and allow undo ben New Users to Excel 3 November 30th 08 10:11 AM
Undo a Macro Elise148 Excel Discussion (Misc queries) 1 June 14th 07 04:57 PM
Undo row insert from macro No Name Excel Programming 2 July 19th 04 10:54 PM
UNDO in EXCEL97 macro david[_9_] Excel Programming 2 July 12th 04 06:48 AM
Undo Macro Danny Excel Programming 1 June 28th 04 04:43 PM


All times are GMT +1. The time now is 09:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"