Consulting

Results 1 to 6 of 6

Thread: force a workbook save

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    force a workbook save

    hello
    is it possible to force a workbook save every time a vba macro is added?
    maybe through an event on the macro listbox everytime an item is added the workbook will be saved?
    thanks
    moshe

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Well I guess you could count the macros when the workbook opens then again on Before_Close and save if there is a different number.

    Or you could just save the workbook automatically on the Before_Close event.

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    What is the rationale behind the question?

  4. #4
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location
    hello
    rationale is:
    i enter macros to a workbook and sometimes excel crashes and i lose what was not saved
    moshe

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So there seems to be another issue which is what you should be addressing.

  6. #6
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Yea, Excel should not be crashing. Uninstall and Reinstall.

    Also you can turn on the autosave option. Tools | Options | Save

Posting Permissions

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