Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert value in html combobox and click 2

Status
Not open for further replies.
tKS in other case, Andy.
but i not have exeperince with dom.
 
TEST...

....
With IE.Document.Forms(0)
'.Item("pepGender").selectedIndex = "1"
.Item("ctl00$ContentPlaceHolder1$ddlCodiceCollegio").Value = "LIVORNO"
'.Item("ctl00_ContentPlaceHolder1_ddlCodiceCollegio_VI").Value = "SALERNO"
Call CLICKB
End With
...

Private Sub CLICKB()

Dim btnInput As Object
Set ElementCol = IE.Document.getElementsByTagName("INPUT")
For Each btnInput In ElementCol
'Debug.Print btnInput.Name
If btnInput.Name = "ctl00$ContentPlaceHolder1$btnFiltra" Then
btnInput.Click
Exit For
End If
Next

Do
DoEvents
Loop Until IE.ReadyState = READYSTATE_COMPLETE

End Sub
 
Probably won't work, since it doesn't appear to run any of the necessary szupporting ASPX code on the page. The following simplified version should work (it does here). As ever, this is NOT a full piece of production code, just solves the core challenge you described.
Code:
[COLOR=blue]With IE.Document.Forms(0)
    .Item("ctl00$ContentPlaceHolder1$ddlCodiceCollegio").Value = "LIVORNO"
    .Item("ctl00$ContentPlaceHolder1$ddlCodiceCollegio").FireEvent ("onchange")
    .Item("ctl00$ContentPlaceHolder1$btnFiltra").Click
End With[/color]
 
Strongm....
oNLY YOU!
tKS....
wORK GEAT!!!!!
 
Strongm, many tk.
but same problem to select 100 from listbox on web page...

based the link:
click on : Albo on line

insert in box comune: ROMA, en click on lens.

appear list of user.

in the top of table on the left, is present a listbox Visualizza with:

10
20
50
100

i need to select 100 from listbox

how to?

i use a tipical IE code to open the page
 
UserForm1.WebBrowser1.document.all("dnn_ctr1675_Albo_ResultsGrid_length")(1).Value = 100
 
TKS strongm,
but after i insert the value 100 in listbox, dont retrieve 100s records..., boh?
 
Oh, I can go back to a previous page to get the link, but my real point is: er ... why did you remove the link?

And what have you tried so far?
 
Just out of curiosity, why would you want to influence / access / affect a web application from a VB 6 app... [ponder]

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top