Results 1 to 8 of 8

Thread: Solved: Capture and Display Excel Creation Date property

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Location
    Sykesville, Maryland
    Posts
    53
    Location

    Solved: Capture and Display Excel Creation Date property

    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>
    Last edited by DomFino; 07-06-2006 at 05:31 PM. Reason: This post probably should be moved to the Access Forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •