Hello,
I have to select a value in a webpage which has 10combo boxes in a table.
Below is the code:
[VBA]aget_List_IndexNo IE1.document.approve.dlr_id, tstr1[/VBA]
The above code will call the below procedure:
[VBA]Sub aget_List_IndexNo(ByRef Ctrl_ref As HTMLSelectElement, tstr As String)
Dim ti As Integer
Dim tctrl As MSHTML.HTMLOptionElement
Application.Wait (2000)
For ti = 0 To Ctrl_ref.Length - 1
Set tctrl = Ctrl_ref.getElementsByTagName("OPTION").Item(ti)
If tstr = tctrl.Text Then
tctrl.Selected = True
Exit Sub
End If
Next
End Sub
[/VBA]
All this was working fine but once I got combo boxes in a with same name on the same page in a table. Its giving me "Type Mismatch" error.
And in [VBA]IE1.document.approve.dlr_id.Click[/VBA]
I am getting error - "Object dosen't support this property or method"
I am doing all this coding in excel 2003.
Any help regarding this is appreciated.
Thanks
Sudhir