+ Reply to Thread
Results 1 to 8 of 8

Need to update a record everytime my workbook is saved

  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Need to update a record everytime my workbook is saved

    Good day,

    I need to do some macro for work, and my basic VBA skills has me lost.

    I need that everytime that my workbook is saved, the information in cells E1, B26 and B31 in the sheet named "SAC CHEF TRIEUR" be copied in Column A, B and C of the sheet named "Historique d'inventaire".

    Thanks for your help with this issue!

    here is my document

    Sac Chef Trieur (Version 1.4).xls
    Last edited by cdn_medic; 08-16-2013 at 02:59 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need some help with this.

    Unfortunately your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Need to update a record everytime my workbook is saved

    cant you just reference those cells in the other sheet?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    02-11-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need to update a record everytime my workbook is saved

    Sorry I realised that what I asked wasn't clear enough.

    I need the information in E1 (Date), B26 (Name) and B31 a (Type of check) be entered on a new line every time the workbook is saved. This workbook is to keep an electronic record of medical equipment inventories and we need to also keep a record of who checked what, when.

    Hope this helps clarify what I need.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need to update a record everytime my workbook is saved

    Hi,

    Thanks for changing the title.

    You'll need to add code like the following to the Workbook Before Save event. e.g.

    Please Login or Register  to view this content.
    Where Sheet1 is the VBA code name of your information sheet and Sheet2 is the Log sheet

  6. #6
    Registered User
    Join Date
    02-11-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need to update a record everytime my workbook is saved

    Thanks for the input, for some reasons, it doesn't work... here is what I did:

    Sac Chef Trieur (Version 1.4).xls

    What did I do wrong?

  7. #7
    Registered User
    Join Date
    02-11-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need to update a record everytime my workbook is saved

    Nevermind, I put the code in sheet1 instead of workbook... works now thanks!

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need to update a record everytime my workbook is saved

    Hi,

    There was nothing in the Workbook Before Save event

    See attached
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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