12-10-2009, 07:28 PM
@Nilesh: Fyi, Janris issue was with "VbList" not the "WebList" and your solution works fine for WebList.
@janris: For VbList object, you can try with the below way.
Note: As the Items in VbList are stored from index "0" :
If we want to select Last item --> .Select ListItemCount-1
If we want to select Second to Last item--> .Select ListItemCount-2
Hope this would solve your issue.
@janris: For VbList object, you can try with the below way.
Code:
ListItemCount=VbWindow("frmMain").VbWindow("...").VbList("...").GetItemsCount
VbWindow("frmMain").VbWindow("...").VbList("...").Select ListItemCount-2
Note: As the Items in VbList are stored from index "0" :
If we want to select Last item --> .Select ListItemCount-1
If we want to select Second to Last item--> .Select ListItemCount-2
Hope this would solve your issue.