XLL sample function AllSupportedExcelTypes

Add-in Express™ Support Service
That's what is more important than anything else

XLL sample function AllSupportedExcelTypes
Option Strict On disallows late binding 
Henri Pellemans

Posts: 110
Joined: 2010-05-06
Hi at ADX,

For some time I haven't looked at the XLL sample function AllSupportedExcelTypes, but today I want to mention an old issue:

If I uncomment the AllSupportedExcelTypes function in an ADX XLL, I get an error message "Option Strict On disallows late binding".

These errors happen at:


How do I solve these errors? I am using VB.NET

Best regards,


BTW I asked this before at http://www.add-in-express.com/forum/read.php?FID=5&TID=9215 but I think I got no answer on my first question at that time.
Posted 14 Jul, 2012 07:31:12 Top
Henri Pellemans

Posts: 110
Joined: 2010-05-06
I changed the code as follows, and 4 errors are gone:

ElseIf (TypeOf arg Is AddinExpress.MSO.ADXExcelRef) Then

                Dim myArg As ADXExcelRef = TryCast(arg, ADXExcelRef)

                Return String.Format("Reference [{0},{1},{2},{3}]", myArg.ColumnFirst, myArg.RowFirst, myArg.ColumnLast, myArg.RowLast)

I suppose this code is correct?

Perhaps it is an idea to supply also an 'option strict on' version of the sample function.


Posted 14 Jul, 2012 07:58:23 Top
Andrei Smolin

Add-in Express team

Posts: 17840
Joined: 2006-05-11

Your code is correct.

Another good suggestion! I saw too many problems caused by Option Srict Off. Supplying two versions isn't probably an option but supplying the code with Option Strict On definitely is. We will certainly look into this. Thank you!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Jul, 2012 11:32:01 Top