+ Reply to Thread
Results 1 to 5 of 5

Best way to create an automatic updater

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-02-2005
    Posts
    146

    Best way to create an automatic updater

    Hey all,

    I am building a workbook that is used to keep track of equipment and labor, per project, for my company. As has been the case in the past, sometimes a new feature is desired, or a formula has a typo or something. Rather than go through and update all the previous versions, I would like to write the update once and have them update themselves.

    What I would like to do is have a button that the user can click that checks for updates. Then whenever I do have to make a change, I make the changes with macros and save them into another workbook.

    Basically the way I figure this thing would work is that it would open the other workbook, compare the version number, and if a greater version number exists, run a set of macros to perform all the updates. If the version number is the same, it displays a message "No updates availible" and closes the workbook.

    So basically I need to know a few things:
    1) Is the way I outlined the best way of doing it, or is there a better way?
    a) Is it better to call a subroutine from from the book to be updated or use a workbook_open() function on the updating sheet?

    2) Can someone give me an example of a code that replaces a userform/module?

    Thanks guys,
    Wilro85

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Wilro85,

    This is an ambitious project. You will need to use the the Visual Basic Intergrated Development Envirnoment (VBIDE) to manipulate the UserForm and other Modules. First, you should get acquainted with this object model. Have a look at Chip Pearson's page Proramming In the VBA Editor. It will help, but won't answer all your questions. Post back with your questions, after you have read it over, and I help you out with the coding.

    Sincerely,
    Leith Ross

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The simplest way would be for any new version to simply import data from the old version before deleting it.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    09-02-2005
    Posts
    146
    After having read the page you sent me to, I immediately realized this was not a feasible options because the user would have to set a trusted zone. I have enough trouble getting people to enable macros in the first place.

    ......................................__................................................
    .............................,-~*`¯lllllll`*~,..........................................
    .......................,-~*`lllllllllllllllllllllllllll¯`*-,....................................
    ..................,-~*llllllllllllllllllllllllllllllllllllllllllll*-,..................................
    ...............,-*llllllllllllllllllllllllllllllllllllllllllllllllllllll.\.................................
    .............;*`lllllllllllllllllllllllllll,-~*~-,llllllllllllllllllll\................................
    ..............\lllllllllllllllllllllllllll/.........\;;;;llllllllllll,-`~-,...........................
    ...............\lllllllllllllllllllll,-*...........`~-~-,...(.(¯`*,`,..........................
    ................\llllllllllll,-~*.....................)_-\..*`*;..)..........................
    .................\,-*`¯,*`)............,-~*`~................/.....................
    ..................|/.../.../~,......-~*,-~*`;................/.\..................
    ................./.../.../.../..,-,..*~,.`*~*................*...\.................
    ................|.../.../.../.*`...\...........................)....)¯`~,..................
    ................|./.../..../.......)......,.)`*~-,............/....|..)...`~-,.............
    ..............././.../...,*`-,.....`-,...*`....,---......\..../...../..|.........¯```*~-,,,,
    ...............(..........)`*~-,....`*`.,-~*.,-*......|.../..../.../............\........
    ................*-,.......`*-,...`~,..``.,,,-*..........|.,*...,*...|..............\........
    ...................*,.........`-,...)-,..............,-*`...,-*....(`-,............\.......
    ......................f`-,.........`-,/...*-,___,,-~*....,-*......|...`-,..........\........

    So I believe I will follow up with royUK's import/delete method instead. Thanks!

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello wilro85,

    Nice artwork! I haven't seen anything like that in about 20 years.

    Leith

+ 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