Title: Message
Here is the sub that calls the 'GetListItem'....
 
Sub myScript1()
Connect "", stWeb
Go_ "http://www.emedny.org/epaces/"
Wait 1
First
text("<INPUT>[EMAIL PROTECTED]") = "userid"
text("<INPUT>[EMAIL PROTECTED]") = "password"
Pause "chkbxAgree<INPUT>[EMAIL PROTECTED]"
Click ""
Pause "Agree/Login<INPUT>[EMAIL PROTECTED]"
Click ""
' *** new page from server appears here......
First
Pause " STRONG MEMORIAL HOSP MH STRON*<SELECT>[EMAIL PROTECTED]"
GetListItem ("Strong Memorial Hospital")   <-----------------  error when this executes
 
Wait 1
Click ""
 
End Sub
********************************************************************************************
'GetListItem' then errors with:
**********************************************************
* Runtime error '91':
*  Object variable or With block variable not set
**********************************************************
Debug points to this line in 'GetListItem': (listed below)
 
If ItemName = e.option(i).innerHTML then
 
 
*************   GetListItem  **********************
Sub GetListItem(ItemName As String)
 Set e = Web.Selected
            For i = 0 To e.options.length
                If ItemName = e.options(i).innerHTML Then
                    e.selectedIndex = i
'The Go command is optional - use if the act of selecting an item is
'designed to navigate to another page, do not use if you are just selecting
'a value and clicking on a button or similar
                    Go_ e.options(i).value   <--------- it is supposed to go to another page
                    Exit Sub
                End If
            Next i
End Sub

Reply via email to