title: Check excel versions (format) using vba
body: <p>I want my VBA code to execute only if the file format is xls. Is this correct?
  I'm doing this:</p>
  
  <pre><code>#If ActiveWorkbook.FileFormat = xlExcel5 Then
    //my code
  Else
    //my code
  #End if
  </code></pre>
  
  <p>I tested using Excel 2010 (xlsm file) and it worked fine.
  I already used PHPExcel library and this is why I chose the xlExcel5, because It's similar to the excel5 I had to choose if I wanted to work with the old excel versions (2003 or lower) while programming in Php.</p>