09-04-2014, 08:12 PM
Hi Guys,
I'm running below script and i'm getting "Unknown runtime error" at ObjWorkSheet.Rows(StartRow).Columns(Environment("Execute")).Value.
Can some please help me out with this issue.
I'm running below script and i'm getting "Unknown runtime error" at ObjWorkSheet.Rows(StartRow).Columns(Environment("Execute")).Value.
Code:
Environment("Execute")="1"
Set ObjExcel = CreateObject("Excel.Application")
ObjExcel.Visible = True
Set NewExcelfile = ObjExcel.Workbooks.Open("c:\temp\1.xls")
Set ResultFile= NewExcelfile
Set ObjWorkSheet=ResultFile.Worksheets("Sheet2")
For i = 13 To 323
StartRow = i
ExecuteStatus = ObjWorkSheet.Rows(StartRow).Columns(Environment("Execute")).Value
If ExecuteStatus = "Y" Then
Browser("ABC").Page("XYZ").WebButton("EFG").Click
Else
msgbox "Button not visible"
End If
Next
Can some please help me out with this issue.