Saving Changes

Another potential problem with an Add-in that contains data is that changes to the data will not be saved automatically at the end of an Excel session. For example, Addin.xlam allows users to edit the data in the range Database, so it is essential to save those changes before the Add-in is closed. One of the nice things about Add-ins is that users are never bothered with prompts about saving changes. Therefore, you need to ensure that data is saved by setting up a procedure in your VBA code. One way to do this is to add the following code to the Workbook_BeforeClose event procedure, or the Auto_Close procedure:

If Not ThisWorkbook.Saved Then ThisWorkbook.Save

Was this article helpful?

0 0
The Accidental Blogging Millionaires

The Accidental Blogging Millionaires

Get Inspired By The Most Popular Bloggers Online! If You Want To Skyrocket Your Success With Business And Improve Your Overall Life You Need To Have A Look At The Accidental Blogging Millionaires! Business can be a fight, particularly when you’re trying to establish one online and like all fights, to succeed you must find the winning techniques and apply them.

Get My Free Ebook


Post a comment