title: VBA how to open a excel file and tell its creation date
body: <p>I am trying to open a file from somewhere and also get the date when the opened file was created. However the line below gives me an error "Run Time Error, Automation error and Unspecified error". How can I fix this? Thanks.</p>
  
  <blockquote>
    <p>MsgBox wb2.BuiltinDocumentProperties("Creation Date")</p>
  </blockquote>
  
  <pre><code>Private Sub CommandButton1_Click()
  
      Dim wb1 As Workbook, wb2 As Workbook
      Dim Ret1, Ret2
      Dim WS As Worksheet
  
      Set wb1 = ActiveWorkbook
  
      'Clear Summary tab
      wb1.Worksheets("Summary").Cells.Clear
  
  
      'Delete existing worksheet with name "Task List Data Export"
      For Each WS In Worksheets
      If WS.Name = "Task List Data Export" Then
          Application.DisplayAlerts = False
          Sheets("Task List Data Export").Delete
          Application.DisplayAlerts = True
          End
          End If
      Next
  
      'Get the File
      Ret1 = Application.GetOpenFilename("Excel Files (*.xls*), *.xls*", _
      , "Please select file")
      If Ret1 = False Then Exit Sub
  
  
  
      'Copy file
      Set wb2 = Workbooks.Open(Ret1)
  
      MsgBox wb2.BuiltinDocumentProperties("Creation Date")
  
      wb2.Sheets(1).Select
      wb2.Sheets(1).Copy After:=wb1.Sheets(2)
  
  
      'Close opened file
      wb2.Close savechanges:=False
      Set wb2 = Nothing
  
      Worksheets("Cover").Activate
  
  End Sub
  </code></pre>