Restore Excel Undo History After Running Macro?

Jun 11, 2014

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

View 2 Replies


ADVERTISEMENT

Excel 2013 :: Enabling Undo After Running A Macro?

Mar 18, 2014

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?

View 3 Replies View Related

Why Do Some Excel Documents NOT Allow To Undo / Redo When Using Macro

Jul 11, 2013

Some 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]

View 14 Replies View Related

Restore Excel File After Deleted?

May 26, 2014

i accidentaly deleted excel file how can is recovery it

View 2 Replies View Related

Excel 2013 :: How To Restore Default VBA Libraries

May 21, 2014

Any way to restore the default reference libraries that are checked the first time you open Tools => References in VBA in Excel 2013. I think I accidentally unclicked something that's necessary to run the program, and I can't find a "default restore" option or anything of that sort.

View 8 Replies View Related

Track Changes History In Shared Excel File?

Jun 4, 2014

how to delete the track changes history whilst the excel file is shared?

View 3 Replies View Related

Excel 2013 :: Importing Data And Maintaining History

Aug 5, 2013

I have to import data from an external source(oracle database) to an Excel(2013) table.

Now the data in the staging table in the database keeps refreshing/changing, However in Excel i need the data to come into a new row everytime instead of refreshing the whole table and looking like the staging table in the database. So basically i need to build history in Excel.

View 3 Replies View Related

Excel 2003 :: Undo Is Not Working

Nov 12, 2013

why my undo just won't ever work. Excel 2003.

View 1 Replies View Related

Macro To Transfer Of Data To History Tab By Date

Mar 5, 2014

I'm building a report and need to transfer data to a History Tab each time the macro is run.

"Report" Tab contains data to be transferred: C6:F6 to the "Historical" tab B:E in the appropriate date row.

The Date would be found from the Oldest date (furthest into the past) on the "Calculations" sheet, Column U.

View 3 Replies View Related

Excel Crashes Erratically After Running A Macro?

Mar 20, 2014

I have developed a model for a client which keeps crashing after being used a few times. The crash is major! Excel shuts down and asks to send an error report.

This can happen after being run anywhere from 3 to 20 times. (Clicking a POST button which transfers items to a "database" type sheet).

I developed the model on a PC using Excel 2010. When this was loaded on a Mac, the user tells me that it happened periodically, and I have seen is occasionally on my PC as well.

However, the workbook has now been loaded on a server, with users across the state of Victoria accessing via Sharepoint - most using Excel 2007. Now it is happening very frequently.

I don't think the macro is at fault, it doesn't go into debug. Excel just seems to GIVE UP.

Have you seen this kind of thing before? Is there a way of "flushing buffers" or something so that Excel can keep working?

I am reluctant to post the model because it is full of personnel details, and is 2.5mb.

View 6 Replies View Related

Running An Excel Macro Using VBA Code In Ms Access

Nov 13, 2006

I am attempting to run a MS Ecel macro that is stored on a MS Excel shared file in a MS Ecel target file (locally stored on my C drive) from a VBA module in Ms Access. That is, from a code i want to open the .xls file that houses the macro, and then open the .xls file that i want to run the file in, and then run the macro.

Here is my situation: the file that houses the macro has the workbook hidden and causes in error.

if i unhide the workbook i get a Run-Time Error 91...object variable or With block variable not set.

if i hide the workbook the vba coding can't find the macro...run time error 1004

once again, i currently have an excel file that houses macro whose workbook is hidden.

does anyone know how this can be accomplished?

here is the ....

View 9 Replies View Related

How To Keep Excel From Running A Macro From Another Open Book

Feb 28, 2009

I have several similar documents open. They each have a macro with the shortcut CTRL + SHFT + T. The problem is each macro is different for each book. When I am working on book X, I don't want macro from book Z to run, but it does.

I need all of them to be open.

View 9 Replies View Related

Excel 2007 :: Redo And Undo Broken After Save?

Jun 8, 2010

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...

View 5 Replies View Related

Build Undo In Recorded Macro

Oct 2, 2006

I have recorded certain macros. But after executing macro 'Undo' do not work. How can I do it ?

View 3 Replies View Related

Excel 2007 :: Running Macro From Protected Workbook

Mar 13, 2008

I have a macro with "ActiveWorkbook.Protect Password:="password"" . It was working fine in excel 2003. In excel 2007, because of this I am not able to run any macro's in the workbook. I am getting a message "The macro may not be available in this workbook or all macros may be disabled. I can see a security warning in message bar saying macros have been disabled, but I dont have have a option to enable the macros.

View 9 Replies View Related

Excel 2007 :: Running Second Macro Causes Formatting To Be Lost

Feb 3, 2013

Running Windows 7, Office/Excel 2007

I have a macro which performs some conditional formatting on a worksheet. Based on the value in cells in one column, if the value meets the criteria some simple formatting is performed (row is colored, font changes for that row etc).

The macro then calls a second macro which performs the same evaluation on the same cells from the same column. If the value meets the criteria (same as previously) it is supposed to change the value of the cell by 1/2.

Both macros work, however the 2nd macro also seems to remove all of the formatting, font changes, coloring etc that occurred from the first macro. I have had the first macro save the active workbook and close and have the 2nd macro re-open the file but it sill overwrites the formatting. If I do not have the 2nd macro run the format changes are saved. I have tried saving the file after the first macro runs with .xls and .xlsx extension and no luck.

View 3 Replies View Related

Excel 2010 :: Current Macros Not Running When Recording A New Macro?

Apr 6, 2013

I have a workbook with numerous macros in it and they are assigned to buttons in the different worksheets. I am trying to record a new macro and when I start recording and click on one of the other macros nothing happens. This wasn't a problem in excel 2003.

View 2 Replies View Related

Excel Instance Doesn't Close When Running Macro From Script

Jul 8, 2014

I have a VBS script that runs a macro in a workbook that is located in a SharePoint doc lib. The code looks like this:

[Code]....

I use code exactly like this to run other queries and it works great, but for some reason when I run this macro the instance of Excel doesn't end after the script is done running. I can see EXCEL.EXE sitting in the Task Manager and I have to end it manually.

Here is the code for the macro and related macros:

This macro just calls my other macros. Each terrslicersXX macro is a different sales territory for which there are slicers to filter out data.

[Code]....

An example of one of the sales territory slicers. Basically it just sets the slicer for the required sales territory so the SaveAsWebpage macro can save the information off as a webpage.

[Code]....

Saves the current data as a webpage.

[Code] ....

I have a feeling it has something to do with the last macro and how I publish the sheet as a webpage but I still can't get it to work.

View 8 Replies View Related

Verify That SSIS Package Ran Successfully After Running VBA Macro From Excel?

Jan 7, 2014

I have an Excel VBA macro which calls a stored procedure. The stored procedure calls a SQL agent, which in turn calls an SSIS package. All I need from the Excel VBA code is to ensure that the SSIS package ran successfully. How do you develop a VBA code to let the user know that the job either failed or succeeded after the user executes the Excel macro? Also, is there a need for a recordset in the VBA code?

View 2 Replies View Related

Excel 2007 :: RunTime Error When Running Macro From Alternative PC

Aug 9, 2012

I am getting a "Run time error 5", "invalid procedure call or arguement" when I run a macro on a PC other tha the one on which it was created.

In this case both PC's are running on the version 2007 of Excel.

This is the highlighted statement when the macro fails

Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"SOCX25!R1C1:R" & Lr & "C23", Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:="SOCX25!R7C25", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion14

View 4 Replies View Related

Undo Option Lost After Event Macro Code

May 23, 2008

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?

View 9 Replies View Related

Excel 2010 :: OnTime Macro Stops Running When Window Minimized

Dec 12, 2013

I am using Excel2010.

My sheet displays values collected from a database via an AddIn. The values are updated by pressing CTRL+G (AddIn function).

I have an OnTime macro running SendKeys "^G" to update the values every minute. When the values exceed a certain limit, a sound is played from a custom Alarm function.

This all works as long as the excel window is active.

But if excel is minimized or another window is opened, the values stop updating until Excel is active again.

When the values dont update the sound is not played and that defeats the purpose of the sheet.

View 6 Replies View Related

Macro To Undo Macro

Jul 23, 2007

If 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 Replies View Related

Restore Validation Using VBA

Nov 28, 2007

I want to do is allow a user to choose entries from a data validation list and then they can remove the validation to make some edits to the selection. I have it set up so that they can do this by clicking on a command button that will remove validation for the selected cells.

What I want to now do is to be able to restore the validation in case they have made an error. My first thought was to have a hidden "Master" sheet that has all the relevant validation in it and then when the user picks a range to restore validation to, just copy the cells from the "Master" back to the working sheet (it should be noted that the range to restore validation to may contain cells with different validation). I'm sure the code for this is quite simple but I am still learning. The steps I want to do are:

1. Store the range of cells chosen on the worksheet
2. Go to the Master worksheet and select the same range
3. Copy the range from the Master worksheets back to the same range on the original worksheet.

View 2 Replies View Related

Restore My Settings

Mar 26, 2007

i made XL App settings in a way suits my needs...........

Is there a code to restore these settings when i reinstall the XL App ?

View 3 Replies View Related

Restore A Previous Save?

Sep 28, 2013

If I erroneously saved over an excel document that is stored on an external drive, is there any way to restore the previous saved document, or am I screwed.

The thumb drive is plugged into a computer that gets backed up onto a network server, but I assume that the external thumb drive is not backed up with the c drive and r drive on the server.

View 3 Replies View Related

VBA - Restore All Font Except Formatting?

Mar 19, 2014

I'm a beginner to VBA and I have a dataset with different loan rates for different schools. So far I can highlight rows based on their rate and order them from least to greatest.

What I want is to be able to restore all of the font to default (i.e. undo the highlighting) without changing the format of a specific column of cells (My G column, with the loan rates, goes from Percentage format to General format)

I'm using Selection.ClearFormats, which changes the format of the cells to general as well as it only restores the format of the cells I highlight, rather than the entire worksheet

So basically, how can I delete all formatting of all cells without changing the cell format (Percentage vs General)?

View 1 Replies View Related

Restore Cell Default Format

Jun 27, 2007

In a worksheet, I should have selected the region where data is present, and center align all the cells. Instead, I selected the entire worksheet and did the same, so that whenever new data comes in the relative cells are already formatted. This has caused the workbook size to increase dramatically. (So, I assume that changing a cell property from the default value uses some memory). Is there a way to restore the format of the blank cells to the default values, so that memory is freed and the workbook size decreases again?

View 3 Replies View Related

Hide Toolbars & Restore Visibility

Aug 13, 2007

I have a procedure that stores the Commandbar names and visibility settings in an array on open. Another procedure hides all Commandbars on open and restores their original visibility settings on close. For some reason the "Standard" and " Formatting" toolbars don't return to visible on close.

My error log says "08/13/07 18:21:37 [QA.xls]MCommandBars.bRemoveMenus(), Error -2147467259: Method 'Visible' of object 'CommandBar' failed". I have tried manually testing the hide/unhide procedure with hard coded settings and checked the correct variables are being sent and all seems to be correct.

I am pretty confident that the procedure to store settings is correct but have included the code just in case, also just noticed the "Standard" and "Formatting" toolbars are the only two visible at programme start.

Public gsaMenus() As String

Public Function bMenuSettings() As Boolean

Const sSOURCE As String = "bMenuSettings()"

Dim bReturn As Boolean
Dim iCounter As Integer
Dim cbrMenu As office.CommandBar

View 9 Replies View Related

Disable The 3 Buttons (minimize / Restore And Close)

Feb 26, 2012

I want to disable the three buttons (minimize, restore and close) excel.

[URL]

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved