Context
I have a XLA AddIn
macro at work. It is use by 10+ people, thus on multiple PC and Excel versions :
- 2010 / 2013 / 2016 (14.0 / 15.0 / 16.0)
- 32bit / 64bit.
The macro runs fine on 2010 / 2013 with 32bit, but make the whole Office (including Word) really slow/buggy on 2016 64bit, although the code does not chrash or lead to unexpected errors.
Where I'm lost
I thus had the Office Code Compatibility Inspector installed and had it inspect my XLA AddIn
. I'm very confused by the results :
Total lines scanned: 21788
Total items found: 724
Deprecated items: 537
Removed items: 158
Changed items: 29
Redesigned items: 0
Declare statements: 0
References Found: 0
That's a lot of found items, but what confused me is in the detailled report.
Example 1 :
TYPE: REMOVED
ITEM: [mso]FileDialogFilter.Description
URL: http://go.microsoft.com/fwlink/?LinkID=215358
CODE: log_erreur "prepare_onglet_donnees", err.description, err.source
The inspector tell me that [mso]FileDialogFilter.Description
was removed
.
The problem is that the Description
property is not on a FileDialogFilter
but an err
object !
Example 2 :
TYPE: REMOVED
ITEM: [mso]OfficeDataSourceObject.Columns
URL: http://go.microsoft.com/fwlink/?LinkID=215358
CODE: .columns(col_pcsid).cells.font.size = 10
Idem : the Columns
object is not on a OfficeDataSourceObject
but a Sheet
object ! (since there is a With wb_Donnees.Sheets("Données")
a few line above.
Example 3 :
TYPE: DEPRECATION
ITEM: [mso]ChartFont.Bold
URL: http://go.microsoft.com/fwlink/?LinkID=215358
CODE: .cells(l, c).font.bold = true
Idem : not ChartFont
but Cells
.
And so on...
So... ? :
Do I not read the report correctly or is the Compatibility inspector going crazy ?