Ans:
Dim SKEY As String
Dim FLAG As Boolean
Private Sub cmdSearch_Click()
SKEY = txtSearch. Text
For I = 0 To 5
If txtCArr(I).Text = SKEY Then
FLAG = True
Exit For
End If
Next
lblOutput1.Caption = Clear
If FLAG = True Then
lblOutput1.Caption = "The Element Is Found At " + CStr(I + 1) + " Position"
Else
lblOutput1. Caption = "ELEMENT NOT FOUND"
End If
End Sub
Private Sub cmdSearch_LostFocus()
For I = 0 To 5
txtCarr (I). Text = Clear
Next
End Sub
No comments:
Post a Comment