I am trying to have a listbox programmatically unselect an item and then scroll all the way to the top.
I tried
Private Sub bringToTop()
Me.lstParts.Selected(1) = True
Me.lstParts.Selected(1) = False
End Sub
But it only works when I have it triggered from a cmd button. It does some funny stuff when I “call” it as part of an onClick event from another listbox; like being unable to select an item at all in the “lstParts” listbox. Any ideas as to why this happens or a better way to go about this???
I tried
Private Sub bringToTop()
Me.lstParts.Selected(1) = True
Me.lstParts.Selected(1) = False
End Sub
But it only works when I have it triggered from a cmd button. It does some funny stuff when I “call” it as part of an onClick event from another listbox; like being unable to select an item at all in the “lstParts” listbox. Any ideas as to why this happens or a better way to go about this???