+ Reply to Thread
Results 1 to 15 of 15

Version Control

  1. #1
    Registered User
    Join Date
    06-19-2018
    Location
    Blackpool, England
    MS-Off Ver
    Newest
    Posts
    6

    Version Control

    Hello Everyone

    This is my first post and I am a medium knowledge user of Excel.

    At my workplace there are a few of us around the building who all need to access a spreadsheet held on our server. A problem occured at the weekend with someone using an old copy, saving it, and it overwrote the newest version.

    What I am after is a way of giving the spreadsheet a version number.
    Incrementing that version number by one everytime its saved.
    Storing that version number on the server in another file.
    When anybody opens the speadsheet it automatically checks against that version number to make sure its the newest version.
    If it doesnt it tells them to update their spreadsheet and quits.

    All help would be appreciated
    Ti

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,658

    Re: Version Control

    Welcome to the forum!

    Seems like the perfect scenario for OneDrive (SharePoint).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  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
    53,048

    Re: Version Control

    Also, if this is on a server, you should be able to retrieve a back-up from the IT people?
    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
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,321

    Re: Version Control

    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    06-19-2018
    Location
    Blackpool, England
    MS-Off Ver
    Newest
    Posts
    6

    Re: Version Control

    Hi All

    We have sorted the problem to recover the spreadsheet we need. But to stop it ever occurring again what I`m after is putting a version number into a cell on workbook (easy).

    Incrementing that number by 1 when the save button is pressed (I dont know how to do that).
    Storing that number in a text/xml file in the spreadsheets folder (I dont know how to do that).
    Next time someone opens the spreadsheet it automatically reads the version number in the cell, checks it is the same as the one stored in the text/xml file, and if so lets the user in. If not tells them to update their spreadsheet and quits. (I dont know how to do these either).

  6. #6
    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
    53,048

    Re: Version Control

    Doing that will require VBA, which means your server will need to allow saving files with macros on them. Not all places allow that, you will need to find out if yours does. Is so, I will move this to the VBA forum

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,658

    Re: Version Control

    Why go to all that trouble when your company must have SharePoint?

  8. #8
    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
    53,048

    Re: Version Control

    Ali, even though a company has access to SP, doesnt mean they are permitted to use it. Last place I worked at, (a US state/military facility), we were not even permitted to go onto FB, let alone any web file-hosting sites.

    Heck, when I made a few "systems" for some of the managers there, they thought I had performed some sort of magic feat!!
    in 1 instance, an accounts supv asked me if there was anything I could help with, to speed up a process that took her almost 2 weeks a month to do. By the time she got back to her office, I called her - she asked if I had more questions, I told her it was done. They thought I walked on water
    Last edited by FDibbins; 06-19-2018 at 04:11 PM.

  9. #9
    Registered User
    Join Date
    06-19-2018
    Location
    Blackpool, England
    MS-Off Ver
    Newest
    Posts
    6

    Re: Version Control

    Ok I am playing around

    I can record a macro that adds 1 to the version number cell. But the save button, where do I find the programming behind that so I can insert my macro into that program?

  10. #10
    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
    53,048

    Re: Version Control

    OK so you can use VBA. I will move this thread for you

  11. #11
    Registered User
    Join Date
    06-19-2018
    Location
    Blackpool, England
    MS-Off Ver
    Newest
    Posts
    6

    Re: Version Control

    Hi All

    Another possibility I now how to attach a macro to a button. Here`s an unusual question - How do I attach a macro to the save button?

  12. #12
    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
    53,048

    Re: Version Control

    Record a macro while you save the file, then add that to the button

  13. #13
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,347

    Re: Version Control

    You could record your number in your text file like this if you want.
    obviously change A1 and the path as required.

    Please Login or Register  to view this content.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  14. #14
    Registered User
    Join Date
    06-19-2018
    Location
    Blackpool, England
    MS-Off Ver
    Newest
    Posts
    6

    Re: Version Control

    Figured it out everyone

    I found out how to run a macro on opening and closing a spreadsheet. So I have a version number on a sheet, exit I increase it by one and export to a text file. Open, I imported from a text file and check it against the version number on the sheet. Turned out to be quite easy in the end.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,658

    Re: Version Control

    Thanks for letting us know and sharing the solution.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Version Control
    By tharindudk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2014, 09:57 PM
  2. [SOLVED] Version Control
    By britinva in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2012, 02:03 PM
  3. Version Control?
    By Kesey in forum Excel General
    Replies: 1
    Last Post: 06-09-2007, 09:11 PM
  4. Version Control for Excel Add-in
    By pmax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2006, 03:10 PM
  5. [SOLVED] Saving Version Control
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 09:05 AM
  6. [SOLVED] Saving Version Control
    By Rob in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. Version Control
    By SandyUK in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-04-2005, 02:05 PM
  8. Version Control
    By MattShoreson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2005, 05:22 AM

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