Henri Pellemans
Guest
|
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:
arg.GetLength
arg.ColumnFirst
arg.RowFirst
arg.ColumnLast
arg.RowLast
How do I solve these errors? I am using VB.NET
Best regards,
Henri
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. |
|
Henri Pellemans
Guest
|
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.
Regards,
Henri |
|
Andrei Smolin
Add-in Express team
Posts: 18830
Joined: 2006-05-11
|
Henri,
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!
Andrei Smolin
Add-in Express Team Leader |
|