I did more work on this. I found that testing the returned variant with “isnumeric” does the trick without throwing a compile time or run time error.
This is the code from the test button. doc.List is a multi-value field on the form this test button is on. doc.match is a field on the test form that the test button checks against for a match.
I can now go on with my little coding project.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim vartestItem As Variant
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
varList = doc.List
vartestItem = Arraygetindex( varList , doc.Match(0) )
If Isnumeric(vartestItem) Then
‘ found; don’t insert
‘not found; insert