Interesting post over at Bacon Bits. The idea here is that a workbook application has a single-field XML Map linked to a shared XML file somewhere. This file contains the current version number of the application, and is updated accordingly by the developer. A handler for the Workbook_Open event refreshes the XML map, and then checks the workbook’s own version number (encoded in the handler procedure) against the refreshed value. If these are different, a MsgBox is displayed prompting the user to get the updated version, and the workbook is closed.
That’s neat. Furthermore, you could use this pattern to do all sorts of ‘dynamic initialization’. For example, a timesheet workbook could initialize itself with a set of current jobs, obtained from a ‘master’ XML file.
This file could itself be the result of a query over a ‘database’ of XML documents. For example, we could have an XML document per job (mapped into, and editable via an Excel workbook), with start and end dates. Jobs without an end date are Active, and are picked up by an XQuery which generates the current ‘master’ file. This is then imported by our timesheet workbooks when they open, as above. I think I might have a go at implementing this workflow – more anon.