hi,
Array can be used only by loops and that could be very if u understand wel.
Try the below coding and if you have any doubts in below codings you can ask me i will explain u in detail.
In Below coding, i had used nested loop (i.e). Loop is nothing but Loop is to make a rotation until it gets the end value. If it is Nested Loop then 2 loops used (i.e)
For i = 0 to 10 'Outer Loop
For j = 0 to 5 'Inner Loop
---------
Next
Next
Outer Loop have the value and comes to the inner loop. Then the inner loop starts the rotation until it getting the end value after that move to the outer loop and goes on until the outer loop ends. Simply we can say one element of outer loop compare with all element in the inner loop.
If u understand the loop concept clearly then only u can do anything in any language.
[QUOTE=Teropod;650258]
Private Sub Command1_Click()
Dim A(2) As String
Dim B(4) As String
Dim intI as Integer 'intI Variable for A()
Dim intj as Integer 'intJ Variable for B()
A(0) = 3
A(1) = 2
A(2) = 67
B(0) = 89
B(1) = 3
B(2) = 2
B(3) = 67
B(4) = 99
'Nested Loop
For intI = 0 to Ubound(A)
For intJ = 0 to Ubound(B) 'Loop works until the size of the B() Array
If A(intI) Like "*" & B(intJ) & "*" Then 'A() compared with the all element in the B()
MsgBox A(intI)
End If
Next
Next
End Sub
Shailaja:)
Private Sub Command1_Click()
Dim A(2) As String
Dim B(4) As String
A(0) = 3
A(1) = 2
A(2) = 67
B(0) = 89
B(1) = 3
B(2) = 2
B(3) = 67
B(4) = 99
If A(0) Like "*" & B & "*" Then
MsgBox "ahoy"
End If
End Sub
It looks like ill have to use loops, because these is not working. And i don't need one value i need to find is one entire dimension of array in other. I am afraid loops will last too long.