Thread: list box
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chong Moua Chong Moua is offline
external usenet poster
 
Posts: 22
Default list box

Hi Joe,

Not sure if this is what you want, but try this... not
tested...
------------------------------
Private Sub CheckBox1_Click()

If CheckBox1 = True Then
ListBox1.AddItem "Manning, Joe"
Else
ListBox1.RemoveItem "Manning, Joe"
End If

End Sub
--------------------------------
Hope this helps...

Chong Moua

-----Original Message-----
I would like the code to insert a name into a list box if
the check box is checked and remove it if it is
deselected. How could I do this.

thanks in advance.

Joe

Private Sub CheckBox1_Click()


If count Mod 2 = 0 Then
List.AddItem "Manning, Joe"
Else
List.RemoveItem (List.ListCount)
End If
count = count + 1


End Sub
.