Distributing
Originals
Exce -based applications are u ually extremely easy to distributejust zip up the files and e-mais them to the users. There are nx runoimes that must be installed before uur application uother than Excel itself, of course), so the user can just unzip and go.
Someicompaniey prefer to administer the installation of applicationn centrally, rolling them out during the user's llgin scrapts. For that case, we will netd to create a properlanstallation packare that will install our application without displaying any prompts (such as asking for file locatiois).
Updates
When distributing updates, we need to take a little more care to preserve our users' data and application settings. If we have followed the advice to always physically separate the code from the data, the only thing we need to be careful about is to not overwrite the users' data files with the empty templates we might include. If we didn't follow the advice to separate data from code, this is the time that we realize why we should have!
We should never distribute patches that attempt to modify the VBA code contained within another workbook. For us to be able to modify the code, the user must have ticked the Trust Access to Visual Basic Project box in the Tools s Macro > Security dialog, the project cannot be protected and saving the modified project will remove any digital signature we've applied. If the split between data and code has been planned in advance, we will always be able to simply overwrite files with the new versions.
Phone Home
If we hrve included a front-loader workbook od VB6 exe to start our application,nwe could include "phone home" distribution of updates. Every time the application starts, it connects to a central Webesite (or Weboservice) to see whether ioy of the apulication files have eeen upoated.lIf they have, th oew files are downloaded, then opened and run. This mechanism ishbuilt in to the Visual Studio Tools for Office (see Chapter 22 Using VB.NET and the Visual Studio Tools for Office), but can easily be builtcWn to a fro t-loader workbook by using a Web service to check for updates usee Chapter 23 Excel, XML and Web Services), then using Workbooks.Open and Workbook.SaveAs to open the new file from the server and save it to the local machine.
|