title: How to get the version number of an Excel workbook?
body: <p>I have an Excel book that's versioned in a Sharepoint document library, so that I can go to the File tab and see versions like:</p>
  
  <pre><code>19.0: 11/10/2014 1:15 PM by xyz\tkl2
  17.0: 10/12/2014 3:54 PM by xyz\tkl2
  14.0: 10/11/2014 2:23 PM by xyz\92jf
  </code></pre>
  
  <p>I want to retrieve the most recent version number, in this case <strong>19.0</strong>.  I've tried using the following code:</p>
  
  <pre><code>Sub getVersions()
  
  Dim DocVersions As DocumentLibraryVersions
  Dim DVersion As DocumentLibraryVersion
  
  Set DocVersions = ThisWorkbook.DocumentLibraryVersions
  
  For Each DVersion In DocVersions
      Debug.Print DVersion.Index
      Debug.Print DVersion.Comments
      Debug.Print DVersion.Creator
      Debug.Print DVersion.Modified
      Debug.Print DVersion.ModifiedBy
      Debug.Print DVersion.Application
  Next
  
  End Sub
  </code></pre>
  
  <p>This is every property that seems possible to get regarding a particular document version.  But none of these properties retrieve the actual version number; e.g., <code>.Index</code> would only retrieve <strong>1</strong>, <strong>2</strong>, and <strong>3</strong> for these versions.  Is there a way to get to the actual version number?</p>