AddIn Exception Invalid Index

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

AddIn Exception Invalid Index
 
Daniel Triendl


Guest


I sometimes get an Exeption: "Add-in error: The Addin has fired an exception, Invalid Index". It's hard to reproduce and only happens on some machines. I already checked that I always set a valid ListIndex for my dropdown lists in my code.

This happens on Win7 64 Bit / Office 2010 (32 Bit)

1. Can I somehow suppress this error? I tried putting ListIndex := XYZ in a try...except statement, but I still get the exception.

2. I tried removing all occurrences of ListIndex from my code and this error still happens sometimes. Could this be a problem with Add-in Express or some command bar caching?
Posted 08 Nov, 2010 08:56:27 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Daniel,

The Invalid Index error may occur not only because the ListIndex property was changed, it may happen when trying to access a non-existing item in any collection by index. I would suggest debugging your code, finding and fixing the code that throws the error.

1. You can handle the OnError event and set the Handled parameter to True. In this way you will suppress all error messages.

2. As I mentioned above, the error may relate to accessing collection items, not only the ListIndex property.

Hope this helps.
Posted 10 Nov, 2010 12:30:15 Top