Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default How to do the "REDO" action in Excel programatically.

Hi everybody... i wanted to know how to do "Redo" in excel
programatically. While there is a method to do "UNDO", i could not find
a method for "REDO". So i tried to simulate a "REDO" action by using
the following method...

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Application.Undo
With Application.CommandBars("standard").Controls("Redo ")
With Application.CommandBars.FindControl(ID:=129)
If .Enabled Then
.Execute
End If
End With
End With
Application.EnableEvents = False
End Sub

I also tried this
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Application.Undo
SendKeys "^y"
Application.EnableEvents = true
End sub
Where "^y" is the shortcut for Redo.(Ctrl+Y)
Well only Application.Undo works, but Redo does not work. To check if
the code works i put the Control Id of Save As and tested and the save
dialog opened.
So, can anybody please tell me where am i going wrong or if there are
any other better approaches to do "REDO" programatically.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 535
Default How to do the "REDO" action in Excel programatically.

Hi Daffo,

Hi everybody... i wanted to know how to do "Redo" in excel
programatically. While there is a method to do "UNDO", i could not find
a method for "REDO". So i tried to simulate a "REDO" action by using
the following method...


Could you explain what it is you're trying to do exactly?

Looks as if you're undoing and redoing immediately after each other,
which doesn't make sense to me?

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default How to do the "REDO" action in Excel programatically.


(change the xxxx to gmail if mailing direct)
"Jan Karel Pieterse" wrote in message
...

Looks as if you're undoing and redoing immediately after each other,
which doesn't make sense to me?


It's a neat way to goto the last edited cell.


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Extract MS Excel Data embedded in MS Word qualityprocess Excel Discussion (Misc queries) 0 April 20th 06 05:52 PM
How do I create an action button in excel? Ian G Excel Discussion (Misc queries) 1 November 8th 05 12:33 AM
How to determine programatically if Excel is installed PeterH Excel Discussion (Misc queries) 2 March 29th 05 08:13 PM


All times are GMT +1. The time now is 08:22 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"