Run a Macro On Open

Microsoft Excel can be programmed to function as an application. The spreadsheet can open automatically to a form for data entry. Another import function is to refresh (import) data from an external data connection, such as a database or XML.

 

The example on the following pages will illustrate the steps needed to connect to an external source, an XML file, and examines the tools for working with external data. We will also create a macro that updates the connection automatically when the workbook is opened.