While the excel sheet is opening and results are seen in the read sub routine I could get no return list back. It was just looping. Killing excel was the only options.
I made one change to the size of the array and then your original rule worked. When I changed it back to 10 the array size outside bounds message popped up. Not sure why that didn't happen from the beginning
Dim oOpts(11) As String

This rule also works good.
Sub Main()
Dim oOpts As New ArrayList
Call Readexisting(oOpts)
Dim oSel As String = InputListBox("MYList", oOpts, oSel, "SELECT THE OPTION", ListName := "Opts")
MessageBox.Show(oSel, "Title")
End Sub
Public Sub Readexisting(oOpts As ArrayList)
Dim oXL As String = CStr(ThisDoc.Path) & "\MyXL.xls"
' Get values of the "A" Column in the spreadsheet to show them in the ListBox
For i = 1 To 10
If CStr(GoExcel.CellValue(oXL, "Sheet1", "A" & i))= "" Then
Exit For
Else
oOpts.add (CStr(GoExcel.CellValue(oXL, "Sheet1", "A" & i)))
End If
Next i
End Sub
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan