Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Undo not working with macro

Hello!

I am creating a macro that modifies some data. I have just notice
that the undo feature isn't available after I use my macro. (I can'
undo what my macro just did)

Is there a line of code that I have to include in my macro o
something??


Thanks
Joh

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Undo not working with macro

Hi John,

See John Walkenbach's site notes:

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



---
Regards,
Norman



"jbchrist " wrote in message
...
Hello!

I am creating a macro that modifies some data. I have just noticed
that the undo feature isn't available after I use my macro. (I can't
undo what my macro just did)

Is there a line of code that I have to include in my macro or
something??


Thanks
John


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Undo not working with macro

John

not much you can do. Running a macro resets the Undo stack. I suppose, if
you think about it, that's logical, as your macro could do an awful lot of
things that might or might not need to be undone.

Regards

Trevor


"jbchrist " wrote in message
...
Hello!

I am creating a macro that modifies some data. I have just noticed
that the undo feature isn't available after I use my macro. (I can't
undo what my macro just did)

Is there a line of code that I have to include in my macro or
something??


Thanks
John


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Undo not working with macro

Hi John

A macro can do tons of dramatic stuff, like deleting tons of folders,
subfolders and files. An Undo library would have to bee just too huge to
have.

So you'll have to manually (aka write code for) register and save the macro
actions and also write an "undo" macro for this. Typically it would be to
save a copy of the workbook at the stage of macro start, and for Undo
replace the workbook with this backup copy. But it all depends what the
macro does. If it just changes a single cell, go for an easier solution.

HTH. Best wishes Harald

"jbchrist " skrev i melding
...
Hello!

I am creating a macro that modifies some data. I have just noticed
that the undo feature isn't available after I use my macro. (I can't
undo what my macro just did)

Is there a line of code that I have to include in my macro or
something??


Thanks
John


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Undo not working with macro

Take a look he

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

In article ,
jbchrist wrote:

I am creating a macro that modifies some data. I have just noticed
that the undo feature isn't available after I use my macro. (I can't
undo what my macro just did)

Is there a line of code that I have to include in my macro or
something??

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
Stop Undo Button from working in Excel 2007 after a Save Jugglertwo Excel Discussion (Misc queries) 1 October 15th 09 09:19 PM
use macro and allow undo ben New Users to Excel 3 November 30th 08 10:11 AM
UNDO in Office 2007 Excel not working. How fix? Panther Al Excel Discussion (Misc queries) 5 February 24th 08 04:32 PM
Why can cause undo and redo to stop working? GDB026 Excel Discussion (Misc queries) 2 December 18th 07 06:25 PM
Undo Macro Danny Excel Programming 1 June 28th 04 04:43 PM


All times are GMT +1. The time now is 05:50 PM.

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

About Us

"It's about Microsoft Excel"