06-01-2012, 11:10 AM
Hi, Try the below script
Code:
Set ObjExcel = CreateObject("Excel.Application")
ObjExcel.Visible = TRUE
Set sworkbook = ObjExcel.Workbooks.Open ("Z:\QTPForum.xlsx")
Set sworksheet = sworkbook.worksheets("Sheet1")
state = sworkbook.Worksheets("Sheet1").Cells(1,1).Value
All_Items = Browser(" ").Page(" ").WebList(" ").GetROProperty("all items")
Each_Item = Split(All_Items,";")
For i = Lbound(Each_Item) to Ubound(Each_Item)
val = Each_Item(i)
If val = state Then
Browser(" ").Page(" ").WebList(" ").Select (state)
End If
Next