ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   WebBrowser- connected combobox selection and function (https://www.excelbanter.com/excel-programming/421897-webbrowser-connected-combobox-selection-function.html)

Çelik

WebBrowser- connected combobox selection and function
 
Hi,
im trying to take data from this page:
https://www.ihale.gov.tr/ssl/vatandas/idareara.htm i have to choose all
of tree combobox. an example first is CUMHURBASKANLIGI, second is GENEL
SEKRETER, third is CUMHURBASKANLIGI GENEL SEKRETERLIGI. how can i do
this choices from excel by macro?
Sorry for my bad english.
Thanks.



ron

WebBrowser- connected combobox selection and function
 
On Jan 2, 5:21*am, Çelik wrote:
Hi,
im trying to take data from this page:https://www.ihale.gov.tr/ssl/vatandas/idareara.htmi have to choose all
of tree combobox. an example first is CUMHURBASKANLIGI, second is GENEL
SEKRETER, third is CUMHURBASKANLIGI GENEL SEKRETERLIGI. how can i do
this choices from excel by macro?
Sorry for my bad english.
Thanks.


The following code will open IE, access the website, select
"CUMHURBASKANLIGI" and then submit the form. I couldn't find your
second and third terms in any of the selection boxes on the web page,
so I don't understand what you wanted to do with them. In any case
the following code should get you started...ron

Sub Access_Website()

' Prepare to open the web page
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "https://www.ihale.gov.tr/ssl/vatandas/idareara.htm"
.Top = 0
.Left = 30
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until .ReadyState = READYSTATE_COMPLETE And Not .Busy
DoEvents
Loop

End With

' Make the desired selections on the web page
Set ipf = ie.document.all.Item("ENUSTIDARE_ID")
ipf.selectedIndex = 1

' Submit the form
ie.document.forms(0).submit

End Sub


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com