this is what i have
Dim i As Integer, J As Integer
Private Sub List1_Click()
On Error Resume Next
For J = List1.ListCount - 1 To 0 Step -1
If InStr(List1.Text, "@yahoo.com") Then
Me.Caption = "found"
Else
Me.Caption = "not"
End If
Exit For
DoEvents
Next J
End Sub
now in my listbox i have email address with and without @yahoo.com
how do i add line of code in this current code if @yahoo.com isnt found then etc please quick
Dim i As Integer, J As Integer
Private Sub List1_Click()
On Error Resume Next
For J = List1.ListCount - 1 To 0 Step -1
If InStr(List1.Text, "@yahoo.com") Then
Me.Caption = "found"
Else
Me.Caption = "not"
End If
Exit For
DoEvents
Next J
End Sub
now in my listbox i have email address with and without @yahoo.com
how do i add line of code in this current code if @yahoo.com isnt found then etc please quick