Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting second to last item of a list box
#5
Not Solved
@Nilesh: Fyi, Janris issue was with "VbList" not the "WebList" and your solution works fine for WebList.Smile

@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.Smile
Reply


Messages In This Thread
RE: Selecting second to last item of a list box - by sreekanth chilam - 12-10-2009, 07:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,714 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  How to select item within WebMenu learnasugo 4 8,142 10-11-2016, 03:35 PM
Last Post: learnasugo
  Compare second web list value according to the first web list value roselin6 1 2,849 10-07-2015, 09:14 PM
Last Post: supputuri
  Searching for and selecting row in Datawindow zsl0009 0 2,810 08-04-2015, 01:02 AM
Last Post: zsl0009
  Problem selecting in a dropdown menu during playback. qemls29 9 13,050 07-28-2015, 05:44 PM
Last Post: Sharan

Forum Jump:


Users browsing this thread: 5 Guest(s)