02-05-2010, 02:06 PM
Hi,
I have written a function, which has parameters weblistname and value in the weblist.
It works for every item in the weblist.
I want to do multiple select what i am doing is
I have written a function, which has parameters weblistname and value in the weblist.
It works for every item in the weblist.
I want to do multiple select what i am doing is
Code:
Call TypetoWebList("operatingSystems", "mac")
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^{DOWN}"
Call TypetoWebList("operatingSystems", "Windows")
WshShell.SendKeys "^{UP}"
Set WshShell = Nothing
i want to press ctrl+down and ctrl+up
manually i can do by pressing shift key and selecting items.
my code is selecting individual items in the weblist.
i want to select multiple items.
Below is the code i have written
Public Function TypetoWebList(WebList_Name, strTypeinWebList)
Set WbList = Description.Create()
WbList("micclass").Value = "WebList"
WbList("name").Value = WebList_Name
Dim objAllWbList
Set objAllWbList = Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(WbList)
AllWbList_Cnt = objAllWbList.Count
for i = 0 TO AllWbList_Cnt-1
WbList_Name = objAllWbList(i).GetROProperty("name")
If Trim(WbList_Name) = Trim(WebList_Name) Then
Dim strWbListOption, arrWbListOption
strWbListOption = objAllWbList(i).GetROProperty("all items")
arrWbListOption = Split(strWbListOption, ";")
For j = LBound(arrWbListOption) to UBound(arrWbListOption)
Print arrWbListOption(j)
If Trim(strTypeinWebList) = Trim(arrWbListOption(j))Then
objAllWbList(i).Click
objAllWbList(i).Select arrWbListOption(j)
Exit Function
End If
Next
Exit For
End If
Next
End Function