Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
When the user presses a commandbutton (exit1_click) on userform 1 (group_1), its supposed to deselect any selections from a listbox (miss_rn) on a second userform (test_nr). When i execute the exit1_click routine, I get an error with the line highlighted in red.
"Could not get the List property. Invalid property array index."
In my testing, test_mr has one selected entry.
The code identifies that the form is open as the msgbox triggers.
Is anyone able to provide any suggestions on what may be causing the error, and what possible resolutions might be?
"Could not get the List property. Invalid property array index."
Rich (BB code):
Private Sub exit1_Click()
'Stop
Debug.Print Me.Name, "exit1_Click() called"
If FormIsLoaded("test_mr") Then
MsgBox "test_mr is open"
' mbEvents = False
test_mr.miss_rn.Selected(test_mr.miss_rn.ListIndex) = False
End If
If agf = 0 Then
Unload Me
Else
Unload Me
End If
End Sub
In my testing, test_mr has one selected entry.
The code identifies that the form is open as the msgbox triggers.
Is anyone able to provide any suggestions on what may be causing the error, and what possible resolutions might be?