gcue Posted September 9, 2008 Share Posted September 9, 2008 (edited) user inputs a serial number HVFLB26412 that value appears in an array column but with other numbers/letters in front of it HA19HVFLB26412 im thinking i need to use stringinstr but what would that look like? here's what i have so far (not working tho) For $u = 1 To $avOut[0][0] $search = StringInStr($avOut[$u][6], GUICtrlRead($serialno)) If Not @error then MsgBox(0, "", "serial: " & $avOut[$u][6] & @CRLF & _ "asset: " & $avOut[$u][0] & @CRLF & _ "owner: " & $avOut[$u][13]) $sn_found = True EndIf Next thanks! Edited September 9, 2008 by gcue Link to comment Share on other sites More sharing options...
trancexx Posted September 9, 2008 Share Posted September 9, 2008 user inputs a serial number HVFLB26412 that value appears in an array column but with other numbers/letters in front of it HA19HVFLB26412 im thinking i need to use stringinstr but what would that look like? here's what i have so far (not working tho) For $u = 1 To $avOut[0][0] $search = StringInStr($avOut[$u][6], GUICtrlRead($serialno)) If Not @error then MsgBox(0, "", "serial: " & $avOut[$u][6] & @CRLF & _ "asset: " & $avOut[$u][0] & @CRLF & _ "owner: " & $avOut[$u][13]) $sn_found = True EndIf Next thanks!You should not be checking @error, but existance of given substring: For $u = 1 To $avOut[0][0] If StringInStr($avOut[$u][6], GUICtrlRead($serialno)) <> 0 Then MsgBox(0, "", "serial: " & $avOut[$u][6] & @CRLF & _ "asset: " & $avOut[$u][0] & @CRLF & _ "owner: " & $avOut[$u][13]) $sn_found = True EndIf Next ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
gcue Posted September 9, 2008 Author Share Posted September 9, 2008 that works perfectly! thank you =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now