-
Hello again!
I'm trying to shorten this code:
If firstofsequence(1) = secondofsequence(1) Then
Picture1.Print firstofsequence(1) & ",";
End If
If firstofsequence(1) = secondofsequence(2) Then
Picture1.Print firstofsequence(1) & ",";
End If
If firstofsequence(1) = secondofsequence(3) Then
Picture1.Print firstofsequence(1) & ",";
End If
If firstofsequence(1) = secondofsequence(4) Then
Picture1.Print firstofsequence(1) & ",";
End If
I thought this would do it, but my program gives a different result:
For x = secondofsequence(1) To secondofsequence(4)
If firstofsequence(1) = x Then
Picture1.Print firstofsequence(1) & ",";
End If
Next
Could you please tell me if the above is right or wrong?
Thanks for any help!
-
<?>
easy enought to check
add a list box for testing and do a visual of what
you are sending
For x = secondofsequence(1) To secondofsequence(4)
list1.additem firstofsequence(1) & " " & x
If firstofsequence(1) = x Then
Picture1.Print firstofsequence(1) & ",";
End If
Next
-
I think this is what you want:
[Code]
For x = 1 To 4
If firstofsequence(1) = secondofSequence(x) Then
Picture1.Print firstofsequence(1) & ",";
End If
Next
:) :) :)