title: Last modification date of open workbook
body: <p>Vba newbie. Need a function to output the last modification date of an open workbook. Here is what I have so far but I am getting a message that my formula contains an error when I invoke the function:</p>
  
  <pre><code>Function LastWBModDate(wbname)
  
      ActivateWB (wbname)
      LastWBModDate = Format(FileDateTime(ActiveWorkbook.FullName), "m/d/yy h:n ampm")
  
  End Function
  
  Public Function ActivateWB(wbname As String)
  
      If IsWBOpen(wbname) Then
          Workbooks(wbname).Activate
      Else
          MsgBox "Workbook : " &amp; wbname &amp; " is not open " &amp; vbNewLine
      End If
  
  End Function
  
  Public Function IsWBOpen(wbname As String) As Boolean
  
      On Error Resume Next
      If Workbooks(wbname) Is Nothing Then
          IsWBOpen = False
      Else
          IsWBOpen = True
      End If
  
  End Function
  </code></pre>
  
  <p>Thanks!</p>