Basically what I am trying to do is find out where in the listbox that the text in text14.text appears in the listbox. That is where the msgbox(smessage) comes in. So for instance if I have this, that, and these in the listbox. How would I find out out the listindex of one of those in the listbox? I have it actually highlighting what is in the listbox. Also the listbox can be sorted or it does not have to be. But can someone help me to find out where my problem is? If I take the comment out of 'List2.RemoveItem Text14.Text then it gives me a type mismatch. Also in the textbox there is just going to be strings and no numberical values in them.
Private Sub Delete_Click()
Dim I As Integer
Dim sMessage As String
sMessage = CInt(Val(Text14.Text))
'If IsNumeric(sMessage) Then
For I = 0 To List1.ListIndex Step 1
If List1.List(I) = Text14.Text Then
MsgBox "Value is not numeric"