VBCCR 1.7.47 & VB6SP6
Hi Krool,
i use the listview in report mode with 6 columns.
Some user get error "9 - Subscript out of range" at the line "If xItem.ListSubItems(4).Tag = 0 Then" in the mouse move event.
How is this possible if i use a "select case" with "case 4"?
The error occurred on Windows 10 (Build 19045). I cant reproduce this error myself.
Check my code:
Code:Private Sub lvwSource_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim subItemIndex As Long Dim xItem As VBCCR17.LvwListItem Set xItem = lvwSource.HitTest(X, Y, subItemIndex) If xItem Is Nothing Then ... Else Select Case subItemIndex Case 0 ... Case 4 If xItem.ListSubItems(4).Tag = 0 Then ... Else ... End If End Select End If End Sub




Reply With Quote