#include <Array.au3>
#include <Excel.au3>
#include <MsgBoxConstants.au3>
#include <Debug.au3>
_DebugSetup()
_DebugCOMError()
$slptime = 500
Local $oAppl = _Excel_Open()
If @error Then Exit ConsoleWrite("Error creating application object" & @CRLF)
Local $oWorkbook = _Excel_BookOpen($oAppl, @ScriptDir & "\Unassigned Credit Card Transactions (MAIN REPORT).xlsx")
If @error Then Exit ConsoleWrite("Error creating workbook object" & @CRLF)
Local $aWorkSheets = _Excel_SheetList($oWorkbook)
If @error Then Exit ConsoleWrite("Error enumerating worksheets" & @CRLF)
For $i = 0 To UBound($aWorkSheets) - 1
Sleep($slptime)
Local $StrVal = "Employee Org Unit 1 - Name"
Local $aResult = _Excel_RangeFind($aWorkSheets, $StrVal)
Local $vResult = $aResult[0][2]
MsgBox(0, "AutoIt - Concur", "Beginning The processing of file : " & $vResult)
Next
ExitI am trying to find the Address of the string in the spread sheet. But when i am executing it i ma getting error "C:\Testing.au3" (22) :" ==> Subscript used on non-accessible variable.: Local $vResult = $aResult[0][2] Local $vResult = $aResult^ ERROR Not sure what the mistake i am making. Any help is appreciated.