kdjonesmtb2
Technical User
I am using an Excel file to load variables in the vbscript code below
I do not think that I have the script set up correctly to load an array that would represent all the columns and rows in the Excel file:
The Excel file layout and values are below:
I am receiving the following error when I run the script:
Unknown runtime error
Line (3587): "File_Header_REF7 = Trim(objDriverSheet.Range("A"& intRow))".
Dim objexcel
Dim objWorkbook
Dim objDriverSheet
Dim intStartRow
Dim File_Header_REF7
Dim REF01_Reference_Identification_Qualifier4
Dim REF02_Reference_Identification5
set objexcel = Createobject("Excel.Application")
'xlApp.visible = true
Set objWorkbook = objexcel.WorkBooks.Open("M:\QTP 834\DataTable_Spillover.xls")
Set objDriverSheet = objWorkbook.Worksheets("Sheet1")
intStartRow = 2
For intStartRow = 2 to objDriverSheet.UsedRange.Rows.Count
File_Header_REF7 = Trim(objDriverSheet.Range("A"& intRow))
REF01_Reference_Identification_Qualifier4 = Trim(objDriverSheet.Range("A"& intRow))
REF02_Reference_Identification5 =Trim(objDriverSheet.Range("C" & intRow))
Next
Excel file being used in script
File_Header_REF7; REF01_Reference_Identification_Qualifier4; REF02_Reference_Identification5
REF 0F 999999900
REF 0F 999999900
REF 0F 999999900