View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Unselect data in a Listbox

I put two listboxes on a userform. Listbox1 was set for multiselect and
listbox2 could only have one selection:

Option Explicit
Private Sub CommandButton1_Click()
Dim iCtr As Long

For iCtr = 0 To Me.ListBox1.ListCount - 1
Me.ListBox1.Selected(iCtr) = False
Next iCtr

End Sub
Private Sub CommandButton2_Click()
Me.ListBox2.ListIndex = -1
End Sub



Chris Gorham wrote:

Hi,

once a user has selected a row of data contained in a
listbox, how do I unselect and clear the highlight without
reloading the data into the listbox...??

Thks....Chris


--

Dave Peterson