title: Macros don't compile in Excel 2016 after import from 2010
body: <p>I'm using / I have developed a VBA Add-in to be used in Excel 2010. The add-in runs as expected in 2010. In Excel 2016, however, a macro that was refreshing the available options on this add-in menu, based on the type of spreadsheet opened, doesn't get updated. I have rechecked the code and the content is the same as it was in 2010. If i try to recompile some parts of code in 2016 I get compilation errors.</p>
  
  <p>The code marked with red as error is for example:  </p>
  
  <pre><code>VERSION 1.0 CLASS
  
  
  Attribute VB_Name = "ClsXXX"
  
  Attribute VB_GlobalNameSpace = False
  
  Attribute VB_Creatable = False
  
  Attribute VB_PredeclaredId = False
  
  Attribute VB_Exposed = False
  </code></pre>
  
  <p>What I have done until now:</p>
  
  <ul>
  <li>enabled running of macros in Excel 2016;</li>
  <li>add the location for my xlam in Excel's trusted sources;</li>
  <li><p>compared the resources used: </p>
  
  <p>Office 2010</p></li>
  </ul>
  
  <p>Visual Basic For Applications  C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
  Microsoft Excel 14.0 Object Library  C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE
  OLE Automation  C:\Windows\SysWOW64\stdole2.tlb
  Microsoft Office 14.0 Object Library  C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\MSO.DLL</p>
  
  <p>Office 2016</p>
  
  <p>Visual Basic For Applications  C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7.1\VBE7.DLL
  Microsoft Excel 16.0 Object Library  C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE
  OLE Automation  C:\Windows\SysWOW64\stdole2.tlb
  Microsoft Office 16.0 Object Library  C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\MSO.DLL</p>
  
  <p>Some advises on how to deal with my issue? </p>
  
  <p>Sincerely,</p>