G Greg Wilson Dec 17, 2003 #2 Try: Sub CountSelected() Dim LB As ListBox, i As Integer Dim X As Integer X = 0 Set LB = ActiveSheet.OLEObjects(1).Object For i = 1 To LB.ListCount If LB.Selected(i - 1) = True Then X = X + 1 Next MsgBox X End Sub Regards, Greg
Try: Sub CountSelected() Dim LB As ListBox, i As Integer Dim X As Integer X = 0 Set LB = ActiveSheet.OLEObjects(1).Object For i = 1 To LB.ListCount If LB.Selected(i - 1) = True Then X = X + 1 Next MsgBox X End Sub Regards, Greg