PDA

View Full Version : force a workbook save



lior03
04-21-2007, 11:24 PM
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

Jacob Hilderbrand
04-23-2007, 09:23 PM
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.

Bob Phillips
04-24-2007, 12:48 AM
What is the rationale behind the question?

lior03
04-24-2007, 12:23 PM
hello
rationale is:
i enter macros to a workbook and sometimes excel crashes and i lose what was not saved

Bob Phillips
04-24-2007, 01:55 PM
So there seems to be another issue which is what you should be addressing.

Jacob Hilderbrand
04-24-2007, 08:44 PM
Yea, Excel should not be crashing. Uninstall and Reinstall.

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