Hi there
Just need to insert 19 different arrays into my script, but still having trouble. Its unique serial numbers with a name to each.
And i want to insert them into this: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
This code works perfectly. My aim is to let the user insert the serial number via input box, then this code should run and display under which name it falls, and then display the name of the serial number, followed by an interaction with the MsgBox commands as seen in the example above. Then when no values are found, it should display the last message in the above script..Code:myAry = Array("0003/3857/0000", "0101/3857/0000", "0201/3857/0000", "0301/3857/0000", "0401/3857/0000", _ "0550/3857/0000", "0601/3857/0000", "0700/3857/0000", "0003/6063/0000", "0101/6063/0000", "0201/6063/0000", _ "0301/6063/0000", "0401/6063/0000", "0550/6063/0000", "0601/6063/0000", "0700/6063/0000") For i = LBound(myAry) To UBound(myAry) If Range("B" & RowNumbr) = myAry(i) Then Qs = MsgBox("The current vote you created is allocated on Vehicle. Is This Correct?", _ vbYesNo + vbQuestion, "VALIDATE") If Qs = vbNo Then Range("C" & RowNumbr) = "No" ElseIf Qs = vbYes Then Range("C" & RowNumbr) = "Yes" End If Exit For End If If i = UBound(myAry) Then MsgBox "Vote Number Not found", vbCritical, "WARNING" Next
Is there any advise? I am very new to VBA scripts




Reply With Quote