Where to Store an Application

In the case of the Excel application for the aforementioned fast food company, all of the data for the application is contained in a single workbook. Since none of this data needs to be hidden from the user, it is reasonable to distribute the code and any concomitant data for the application directly in the workbook that contains the data (the pivot table). This makes the workbook totally self-contained and eliminates the need for an installation procedure. All the main office needs to do is email the workbook to its field offices. There are several possibilities here, however:

• Store the application and its data in the document in which it will be used. This is suitable for a standalone application like the one shown in Figure 10-1. It is also suitable for small macros, such as those contained in code fragments throughout this book, that we want to run just to see how some Excel VBA feature is implemented.

• Store the application and its data in an Excel template. This is suitable, of course, when the template will serve as the basis of multiple spreadsheets.

• Store the application and its data in a hidden Excel workbook in Excel's startup directory.

• Store the application and its data in an Excel add-in.

Each of these choices has its advantages and disadvantages, which, incidentally, vary among the Office applications. For instance, templates are much more useful in Word than in Excel, and add-ins are more useful in Excel than in Access. In any case, our interest here is in Excel.

0 0

Post a comment