End FunctionPublic Function TestFileExists(strFile As String) As BooleanOn Error Resume NextTestFileExists = Not (Dir(strFile) = “”)End FunctionThe code in the sample database requires a reference to the Excel object library;
Figure 3.7 shows this reference checked in the References dialog, which is opened
from the Tools menu in the Visual Basic window.FIGURE 3.7Setting a reference to the Excel object model.
After the worksheet of archived records has been created and saved, you will get a message
(depicted in Figure 3.8) listing the location where the archive worksheet was saved.FIGURE 3.8A success message after records are archived.
NOTENOTE
Analyzing Data with Excel 3