you can try like this to see if it suits your needs
Code:salga = Array("0301/4535/0000", "0550/4535/0000") 'Salga sec = Array("0301/4213/0000", "0550/4213/0000", "0700/4213/0000") tarw = Array("0101/4515/0000", "0401/4515/0000") 'Target Women tary = Array("0003/4517/0000", "0401/4517/0000") 'Target Youth train = Array("0211/4523/0000", "0501/4523/0000") 'Training ReDim myarr(4) ' change to suit if more arrays are used myarr(0) = salga myarr(1) = sec myarr(2) = tarw myarr(3) = tary myarr(4) = train spec = InputBox("enter value", "Serial No", "0101/4515/0000") For i = 0 To UBound(myarr) For j = 0 To UBound(myarr(i)) If myarr(i)(j) = spec Then fnd = True: Exit For Next If fnd Then Exit For Next If fnd Then MsgBox "The current vote you created is allocated on Vehicle." Else MsgBox "Vote Number Not found", vbCritical, "WARNING" End If




Reply With Quote