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