+ Reply to Thread
Results 1 to 8 of 8

VBA code for audit trail issue

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    VBA code for audit trail issue

    Hi,

    Not sure if this will be possible - I have a workbook in which vba is used to record changes made on one sheet onto another sheet called 'log'.

    The code works fine when people make changes in cells one at a time but if they paste in data to more than one cell at once I get a run time error '13'.

    So the code I am using on the sheet where the changes are is:


    Please Login or Register  to view this content.
    The code on the log sheet is:

    Please Login or Register  to view this content.

    Any ideas how I can enable the changes to be logged if more than 1 cell is changed at once? Thanks in advance for anyone taking the time to look at this.
    Last edited by TheGrinch1; 06-05-2015 at 09:01 AM.

  2. #2
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: VBA code for audit trail issue

    My apologies, I have now amended my post accordingly, thanks for pointing out the error.

  3. #3
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: VBA code for audit trail issue

    Why do you not Share the Workbook and Enable Track Changes?
    Then you dont need any VBA to Track changes

    Greets
    Loki

  4. #4
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: VBA code for audit trail issue

    Hi LordLoki,

    I really need to do it through VBA, its par of a wider piece and I have gone down this road now - plus I am trying to better myself at VBA and understand it more and so understanding how I can convert my original code to allow for this adaption will help me further my knowledge. Thanks for your suggestion though.

  5. #5
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: VBA code for audit trail issue

    I did something similar with some help from the forumites here. (try my thread for some pointers http://www.excelforum.com/showthread...t=#post4059392)

  6. #6
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: VBA code for audit trail issue

    Hi Kramxel,

    Thanks for pointing me to your thread. Reading through it I am not sure it solves my issue - my code works fine as it is up until two cells plus are amended at the same time (by someone pasting in data), at this point the logger fails. I cannot see that resolved in yours, however I will work through your thread more thouroughly to double check this. Appreciate the help though.

  7. #7
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: VBA code for audit trail issue

    Hi Grinch,

    In case you did not solve your problem here is a solution.
    Its not very beautiful but it works

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: VBA code for audit trail issue

    That is superb, works a treat - thank you very much, I was still having problems with it.

+ 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. Audit Trail
    By jenziepie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2013, 01:56 PM
  2. Doing an audit trail on multiple sheets
    By Nett in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-05-2013, 08:18 PM
  3. Excel Audit Trail?
    By jvest0648 in forum Excel General
    Replies: 1
    Last Post: 12-17-2011, 02:57 PM
  4. Track Changes - Audit Trail
    By ChemistB in forum Excel General
    Replies: 2
    Last Post: 10-27-2006, 02:16 PM
  5. Audit Trail
    By Pendelfin in forum Excel General
    Replies: 1
    Last Post: 01-23-2006, 11:10 AM

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