+ Reply to Thread
Results 1 to 11 of 11

macro to record all actions in excel

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    macro to record all actions in excel

    i have several workbooks that ask to save, even if i haven't done anything to the workbook.

    so i need a macro to save the log file in my personal.xlsb so i can review what is going on with the workbooks.

    need to see the name of the workbook, the actions taken and the date/time that they occurred.

    i searched the net (and this forum) but didn't find any results that i could use.

    can this be done?

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: macro to record all actions in excel

    Hi there,


    i have several workbooks that ask to save, even if i haven't done anything to the workbook

    This can be puzzling until you realise that things like the evaluation of volatile functions (e.g. Now()) count as "changes" to a workbook.


    The following link might be useful if you wish to implement some sort of logging facility:



    Hope this helps.

    Regards,

    Greg M

  3. #3
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: macro to record all actions in excel

    Greg,

    I looked at the thread and downloaded the xlsm file but at a loss on how to:

    1) record every excel action that is made to any open file
    2) print out the workbook full-name, the cell address, and the change to the cells value or formula. put in sheet "Logfile" on the personal.xlsb workbook.

    Can you help with that?

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: macro to record all actions in excel

    Hi again,

    Wow! That would definitely NOT be a "quickie"!

    At best you might manage to record actual changes (not calculation changes) to cells, and this could be a HUGE output if (e.g.) someone were to delete an entire column. In such a case an entry would probably be written to the logfile for EACH cell in the column

    Sorry if that's not what you want to hear, but I'd certainly be happy to be contradicted on this.

    Regards,

    Greg M

  5. #5
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: macro to record all actions in excel

    just trying to track down what is making my files appear as if they have saved. i understand that this might be big (but really not) if i were to delete a column (wont do). just need to see why the file's appear as if changed. is that something that could be done in just those files? really only two concern me, my vendordatabase.xlsm and projectinfo.xlsm. would that make it easier?

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: macro to record all actions in excel

    Hi again,

    Just a quick question/suggestion - is it possible that the "Workbook_Open" routine is doing something that counts as a workbook "change"? As a general rule I always include a "ThisWorkbook.Saved = True" statement at the very end of the "Workbook_Open" routine.

    I'll have a think about your logging requirements, but I don't think it's going to be easy

    Regards,

    Greg M

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: macro to record all actions in excel

    Is there any code in the files?

    Are there formulas?

    Named ranges?

    Dynamic named ranges?

    Links to other files?
    If posting code please use code tags, see here.

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: macro to record all actions in excel

    .
    Here is a tracker project that registers most all changes :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: macro to record all actions in excel

    Quote Originally Posted by Norie View Post
    Is there any code in the files?
    Are there formulas?
    Named ranges?
    Dynamic named ranges?
    Links to other files?
    so no formulas, but do have named ranges (that are not dynamic)

    do have a workbook open on projectinfo but that is just changing some settings. disabled the code in ThisWorkbook, saved it, closed it and reopened it. still same behavior.

  10. #10
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: macro to record all actions in excel

    Quote Originally Posted by Logit View Post
    .
    Here is a tracker project that registers most all changes :
    Let me give this a whirl and i will let you know. thanks in advance for doing this.

  11. #11
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: macro to record all actions in excel

    so i made a few changes to the sheetchange event. see below. question is how to set this up with personal.xlsb so that it scans all open workbooks?

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel macro recording DOES NOT record actions but results! Useless.
    By dejudicibus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2015, 05:11 AM
  2. simple macro to add new record, edit/ search and print record
    By xmoore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2015, 08:10 PM
  3. [SOLVED] Undo Macro actions
    By rskfriends in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2014, 02:51 AM
  4. [SOLVED] Record Macro function does not record certain commands
    By m185945 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-01-2013, 11:02 AM
  5. Macro in Excel A to perform actions in Excel B
    By lukasz_rz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-23-2013, 05:30 AM
  6. Macro add new record without replacing or affecting old record
    By Kenji in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-23-2010, 01:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1