I am having a hard time figuring this out. I hope someone can help.
I have an Access 2003 database that is used to simply run reports. The
data for the reports comes from a linked Excel 2003 spreadsheet.
I have a Report Form in Access that allows users to select the report they
wish to run. What I need is to have the date and time the Excel
spreadsheet was created show on the Access form so the user knows the
last time the data was refreshed.
This is code I have so far and it does not work. The Creation Date
property in Excel has the date and time I need to display on the Access
form but darn if I can figure out how to capture it and display it
This code is behind the Access form.
[vba]Option Compare Database
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
Set objWorkbook = objExcel.Workbooks.Open("V:\CPSI-AccessDB\WebPAS\webpas_download.xls")
Wscript.Echo
Debug.Print objWorkbook.BuiltinProperties(11).Value
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
[/vba]
</IMG>