Appendix III Installing the Microsoft Excel Add-in For the Freeway Service Patrol Beat Evaluation Model 1. Introduction and Background In previous releases, the FSP Beat Evaluation (FSPE) Model has been entirely contained within a single Excel workbook. 18 In FSP version 4 and earlier, the FSP delay models were implemented directly in worksheets using built-in Excel cell functions and cell formulas. Some of these worksheets (i.e., pages) were hidden from the end user and some were visible to the end user as were the worksheets displaying the beat specific inputs, default model parameters, and resulting benefit-cost estimates. In 2000 2001, several proposed improvements to the FSP models could not be implemented due to the size and functionality limitations of Excel s worksheets, cell formulas, and built-in cell functions. Therefore to overcome these limitations, the FSP delay model was converted to Visual Basic for Applications (VBA) code and implemented as built-in VBA modules (as opposed to being contained in directly in the workbook s worksheets) to accommodate the more detailed queueing model. The FSP evaluation model was executed when the user clicked on the Calculate FSP Benefit/Cost Ratio button on the INPUT page of the FSPE workbooks (see Figure 1). To clarify, each and every FSPE workbook contained not only the worksheets (i.e., pages) holding the beat specific inputs, parameters, and resulting benefit-cost estimates, but it also contained the FSPE delay model itself. This meant that if a user were analyzing 100 FSP Beats, she would create 100 FSPE workbooks (i.e., 100 Excel workbooks, each saved with a different name), each containing the Beat specific inputs and results; and embedded in each workbook would be the FSP delay estimating model, and the benefit and cost estimating procedures. This meant that the user would have to make changes to each of these 100 workbooks each and every time the FSP model were updated, or else copy all the inputs and default parameters from the old models (the 100 FSP workbooks) to new ones containing the new FSP delay model. The upside of this single file configuration was that the FSPE model was self contained within a single workbook; thus it was simple to install just make a copy of the FSPE workbook and fill in the inputs and click on the Calculate FSP Benefit/Cost Ratio button. The downside of this single file configuration was the repetitive and time consuming nature of updating the model as previously explained. Physically and functionally and, the FSPE model can be divided into two main components (1) the several pages (or worksheets, to remain consistent with the Excel terminology), visible to the user holding and displaying the beat inputs, model default parameters, and the resulting benefit- 18 An Excel workbook is a single file (with an.xls extension) which may contain up to 256 worksheets (sometimes referred to as pages), graphs, and embedded VBA macros. 46
cost estimates; (2) the actual model that calculates the incident-induced vehicular delays, delay savings, benefits and the costs of providing FSP service to this beat. To overcome the problem whereby each of the FSPE Beat workbooks contained its own copy of the FSPE model (each of which had to be updated with each new version of the FSPE software), the VBA code containing the FSPE model was saved as an Excel Add-in (a file with a.xla extension which contains VBA sub-procedures and menus). This way, every FSPE workbook loads and executes the exact same delay model the VBA code and menus held in this one Excel Add-in file named fspe_v14.xla. When subsequent updates to the model are released, only one file, fspe_v14.xla has to be modified (or replaced) instead of modifying or updating 100, or so, individual FSP Beat evaluation workbooks. 2. Installing Fspe_v14.xla Installing an Excel Add-in is relatively straight forward and simple. The steps are (with illustrations): Copy the FSPE Beat Evaluation workbooks (with the.xls extension) and the FSPE Add-in file ( fspe_v14.xla ) to a subdirectory (e.g. C:\FspBeatEvaluations ) Start Excel; a workbook need not be open. On the main Excel menu, Click on Tools (See Figure 2) On the Tools menu (that appears), click on Add-Ins (See Figure 3) On the Add-Ins menu, click on the BROWSE button (See Figure 4) Browse to the subdirectory where you copied fspe_v14.xla and the FSPE workbooks. Select the file fspe_v14.xla Note: the XLA file extension might not be visible depending upon your file-display settings (See Figure 5) In Excel s Add-In menu, click on OK (See Figure 6) You re done; you told Excel to include the fspe_v14.xla Add-in when it opens. One last step, you must allow macros to be executed when you open the FSPE workbooks, i.e., the Beat evaluation spreadsheets, in order for the VBA macros to be executed (See Figure 7). If the Microsoft security settings are set to the highest level, then the macro(s) will be disabled without warning to the user, hence the application will not work. Security settings must allow for running (enabling) macros. 47
Figure 1: FSPE s INPUT worksheet and the Calculate FSP Benefit/Cost Ratio Button Figure 2: Excel opened with no workbook loaded 48
Figure 3: Figure 4: Microsoft Excel s Tool Menu Excel s Tool Add-In Sub-Menu Figure 5: Microsoft Excel s Tool Add-In Browse Sub-Menu 49
Figure 6: Microsoft Excel s Tool Add-In Sub-Menu (after fspe_v14.xla selected). Figure 7: Enable Macros option for workbooks that contain VBA macros. 50