cheesestain Posted March 11, 2018 Posted March 11, 2018 I'm trying to input text from an an excel file stored in an array using _IEFormElementSetValue _IEFormElementSetValue($oQuery, $aResult[$i][0]) But i'm getting this error when i execute: Array variable has incorrect number of subscripts or subscript dimension range exceeded I verified that i can use $aResult[$i][0]) in a msg box and it displays the result i want but for some reason I can't use it in _IEFormElementSetValue
Danp2 Posted March 11, 2018 Posted March 11, 2018 Not enough information. Is this being performed within a loop? What is the value of $i when the error occurs? How big is the array? Latest Webdriver UDF Release Webdriver Wiki FAQs
cheesestain Posted March 11, 2018 Author Posted March 11, 2018 It's in a For loop. The value of $i is 1 and the array is small. 3 columns and 5 rows. For $i = 1 to UBound($aResult); _IEAttach("3M") _IELoadWait($oIE) Local $oForm = _IEFormGetObjByName($oIE, "pricingSearchForm") $oQuery = _IEFormElementGetObjByName($oForm, "productNum") _IEFormElementSetValue($oQuery, $aResult[$i][0])
Danp2 Posted March 11, 2018 Posted March 11, 2018 For $i = 1 to UBound($aResult) This probably should be For $i = 0 to UBound($aResult) - 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
cheesestain Posted March 12, 2018 Author Posted March 12, 2018 5 hours ago, Danp2 said: For $i = 1 to UBound($aResult) This probably should be For $i = 0 to UBound($aResult) - 1 Thank you! It worked!
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