Macro To Undo Macro
Jul 23, 2007If any work is done by a macro it canot be restored by undo. Can a macro be provided so that I can attach the same to my codes and thus undo action can be performed?
View 3 RepliesIf any work is done by a macro it canot be restored by undo. Can a macro be provided so that I can attach the same to my codes and thus undo action can be performed?
View 3 RepliesI have recorded certain macros. But after executing macro 'Undo' do not work. How can I do it ?
View 3 Replies View RelatedSome of my Excel files work perfectly in terms of undo/redo, while others simply cannot use that feature. I took a stroll through the internet looking for the answer, but the issues that I found seemed to point to the application losing its ability, which was resolved with a registry edit/update/change. I don't think that's the case here because I CAN undo is SOME documents.
After some investigation with my problem documents I have found that THIS Macro is the one thing all my undo-free documents have in common: [URL]
A coworker just ran something by me that i'm quite frankly baffled by. After running a macro, the undo function becomes disabled up to the point of when the macro was ran. I've done a quick search through the forums and can't seem to find this question so i thought i'd ask.
Is there an option to toggle somewhere or 3rd party addon that keeps Undo enabled after running a macro? On a similar topic for my own curiosity, what's the reason that it disables?
I managed to implement a macro that adds a time/date stamp in Column A when any of the subsequent cells in that row are changed. With this now working, I really need the ability to restore the undo history in case a change to the data needs to be reverted.
Sub procedure:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Application.EnableEvents = False
For Each c In Target
If c.Column > 1 And c.Column < 21 Then
Cells(c.Row, 1) = Now
End If
Next c
Application.EnableEvents = True
End Sub
I have a sales spreadsheet, that people on this forum have very kindly helped me with by giving me two macros; one to remind users that they need to update the month cell when an order comes in, and the other to automatically put the date in a cell when any cell in that row is changed.
The final thread is here: Message To Remind That Cell Is Mandatory
and the Macro used is:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Application.EnableEvents = False
For Each c In Target
If c.Column = 11 Then
If c.Value = "100 - Purchase Order In" Then
MsgBox "Is the Month In correct?"
End If
End If
If c.Column > 1 And c.Column < 18 Then
Cells(c.Row, 1) = Now
End If
Next c
Application.EnableEvents = True
End Sub
However...
We've now found that we cannot undo anything in these spreadsheets. If, for example, a cell is incorrectly copied or deleted, the only way of undoing the change is to shut down the spreadsheet without saving!
Is this just a by-product of using the time macro (a search on other threads suggests that it might be), and, if so, is there any way of changing it?
How do undo a column name, say you named column "b" boy how do you get it back to b.
View 2 Replies View RelatedA Worksheet_Change macro in Sheet1 changes the font colour if the target is cell(1,1). So, if I change the value of cell(1,1), it will become red. But then I cannot change it back to the original value because the undo button is not active anymore. And what if I changed cell(1,1) by mistake instead of cell(2,1), and I want to put it back to the original value?
View 5 Replies View RelatedI have a database in excel which I want only selected users to have edit rights & others should have readonly rights. I have written the following code where a pop up would appear in selected cells warning user for editing the said cell. What I want is when a user clicks yes he should be able to edit it & when he clicks no the cell should get protected.
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim rTriggerCell As Range
If Not Intersect(Target, Range("D1:D100")) Is Nothing Then
Set rTriggerCell = Target
Application.EnableEvents = True
If MsgBox("Edit Cell?", vbYesNo)
End If
On Error Goto 0
Exit Sub
End If
How do I undo text to columns?
I had a list of email addresses that I put into two columns with the @-now I have finished manipulating and I need to have the email addresses whole again.
The email is now in column A and the domain is in column B. I cannot click undo.
I need to create an Undo Last command button.
I have created a textbox using the control toolbox and I have created command buttons that populate text when I click them into the text box.
Do you guys know the code for a command button to undo the last entry in the text box.
How can I do the above Title?
View 1 Replies View RelatedI am unable to undo/redo in MsExcel. Have tried to uninstall/reinstall office, all updated are current.
View 9 Replies View RelatedWhat i have is a userform which contains textboxes a user can enter or change data in.
What i'd like to do is to have a button called something like "undo last" whereby a user can 'swap' back the last change they made.. does anyone have any idea how i might go about it?
Is it possible to enable the undo command when using VBA code in a spreadsheet? Right now if someone makes a mistake it can’t be undone.
View 5 Replies View RelatedIn Dave and Raina Hawley's excellent Excel Hacks book they showed how to increase the undo limit of 16 up to 100. THis only works for EXcel 2002. Any Bright spark know how to do this for Excel 2003?
View 2 Replies View RelatedI cannot get the UNDO feature to work.
Is there a structure inside of Excel which keeps track of all the actions taken by a user (something that would presumably be used to allow for an undo sequence)? If so, is there a way to get access to it?
View 2 Replies View RelatedI'm working on a massive Excel sheet which admittedly uses tons of macros, comboboxes and pivot tables. My issue at the moment is that I have no idea why Excel is pasteing values from specific sheets into the current sheet, when I click on 'Undo'. I've only been able to replicate it when i copy, paste and then undo. I've removed code relating to those sheets and it still does it. I also have no macro's using Ctrl+z. The sheet, whose values it's pasting, does use comboboxes. I have changed the linked cell property in Excel to the "SheetName"!"Cell". It still does this. The odd thing is that it doesn't do it to new workbooks or new sheets.
View 9 Replies View RelatedI have created a spreadsheet in the field of marine surveying. In that sheet, I have used a lot of macros (21 modules) and a lot of VBA, most of it provided by kind people on this forum. But what has happened now, is that when I use that particular worksheet, the 'Undo' menu item in the 'Edit' menu has become permanently grayed out and it says 'Can't Undo'.
In other words, I cannot undo, even if I have made the wrong entry in an unprotected cell. If I use any other sheet, or make a new sheet, everything returns to normal. So, is there any way I can re-gain the 'Undo' facility, while using that particular sheet. I am using Excel 2003 on a Windows XP Home (SP3) platform.
I keep a client list and excel at random will essentially hide entire rows of entries. For example if I go to search a name from the name column that I know I entered nothing will return but if I specifically enter the cell number that is hidden the information will be show, does excel 2011 have an auto-grouping or hiding feature that I'm not aware of? If so, how do I get rid of it? I'm not sure if this makes a difference but all the numbers to the left most of the sheet are blue where in every other sheet they are gray.
View 2 Replies View RelatedIn some excel files the redo / undo buttons are grayed out
View 3 Replies View Relatedwhy my undo just won't ever work. Excel 2003.
View 1 Replies View RelatedI'm using a lot of "activeCell.offset(row,col).address" type of entries to form formulas for me. All of the references come across as Absolute References - $G$24, for example. Is there a different way for activeCell to give me a "normal" address ('G24' vice '$g$24') or a function that will convert for me?
View 2 Replies View RelatedI'm new to VBA & would like to use the MsgBox() function to display some of the data found in the information pop-up window when a user hovers the mouse over the undo button (e.g. Typing '=ABS(C3)' in C6).
I want to take this text to put it into something like this:
MsgBox("You just " & CODE_FOR_UNDO_TEXT & ".")
This will allow me to remind users of the last action they took.
I have a user who wanted a spreadsheet to highlight cells containing formulas whenever the formula was changed. (They want the ability to make changes, but want those changes highlighted. They do not want to protect cells with formulas.) I tried to accomplish this with Conditional Formatting but could not figure out a way to do it, so I turned to VBA. I wrote the following routine that is called on the Worksheet_change event:
Sub CheckFormulas(Target As Range, FormulaRange As String)
Dim CurCell As Range
For Each CurCell In Range(FormulaRange)
If Target.Address = CurCell.Address Then
Target.Interior.ColorIndex = 3
End If
Next CurCell
End Sub...................
I do have a VBA that runs in the report. For whatever reason this stops excel back button (or CRTL Z) from working. What would i need to change in order for back button to work?
I know it is due to this VBA since all other spreadsheets are working fine and as soon as i open this spreadsheet undo button stops functioning.
Private Sub Worksheet_Calculate()
Dim MyPic As Picture
Me.Pictures.Visible = False
Pictures("Picture 11").Visible = True
With Range("AH1")
For Each MyPic In Me.Pictures
If MyPic.Name = .Text Then
[code].....
I have Excel 2007.
Undo / Redo - they do NOT work properly after a save. Before a save, its great - I can undo / redo many many changes.
After a save, I can only undo 2 changes, but the worst thing is it ONLY REDOES ONE of them.
I work by saving very regularly, then I go and look at something on the sheet, and then use Undo / Redo to get back to where I was last updating the sheet and see what I had just been working on, especially if its a few minutes in between.
However, when I do that now, it undoes my last change, but the redo has been lost. So I do:
change, save, undo, redo
and it just doesn't do the redo. The redo button is greyed out.
If I do:
change, change, save, undo, undo, redo, redo
the first redo works, and the second fails as the redo has been lost.
It seems pretty basic that undo / redo should be symmetrical but they aren't, at least now.
I would rather just not have undo after save at all than this broken version.
Why are they putting so much stuff in Excel but they can't even get one of the most basic parts of spreadsheets correct - such as undo / redo, and the ability to open independent spreadsheets without having to change things in the registry (which I have had to do so I can work on two spreadsheets in a semi-sane fashion, undo being shared across your sheets otherwise). MS needs a back to basics...
I have a file without password (on file there is sheet protection) & file in shared base with 31 sheets.
User can't do following things :
1. User can't Hide column and can't make a change in column width
2. User Can't delete any sheet from file.
if user do the above thing then undo the event or stop the above event.
This file is on shared mode and i don't want to use sheet protection
I am trying to make a save&close workbook macro.
I found several examples on google, but unfortunatly it conflicts with another macro I use for forceing users to enable macros (hide all sheets except one if macros are disabled).
The attached file is an example contaning the save&close code and the show/hide sheets depending on macros enabled.
If the file is opened with macros disabled then only one sheet will be visible.
If the file is opened with macros enabled other sheets are visible.
The problem if that this code uses a custom save, witch makes the save&close not save... (in module1 and in ThisWorkbook)
The pourpose of the save&close is to make sure some users don't forget the excel open and thus block access to it. So if a certain idele time passes excel has to save and close without any confirmation messages.