İyi günler,
Ben hiç bir bilgim olmamasına rağmen belki saçma oldu ama aşağıda yer alan kodu yazdım ve çok güzel de çalışıyor. Yanlız a sütunundaki bütün verileri sorgulayıp b ve c sütunlarına atmasını istiyorum. Şu anda sadece a2 deki tc numarasından sorgu yapıyor ve b2 ye adresi c2 ye ilçeyi yazıyor.. bütün sütunu aynı anda sorgulayıp atmasını istiyorum.
Yardım ederseniz sevinirim..
Sub Arama()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://............................."
IE.Width = 1500
IE.Height = 1000
IE.Visible = False
While IE.Busy
DoEvents
Wend
IE.document.getElementById("ctl04_ctlTCKimlikNo").Value = Range("A2")
Application.Wait Now + TimeValue("00:00:02")
IE.Visible = False
While IE.Busy
DoEvents
Wend
Set TrackID = IE.document.getElementById("ctl04_ctlKpsAdresPageCommand_CommandItem_Search")
IE.document.getElementById("ctl04_ctlKpsAdresPageCommand_CommandItem_Search").Click
IE.Visible = False
While IE.Busy
DoEvents
Wend
Range("B2") = IE.document.getElementById("ctl04_ctlAdresBilgi").Value
Range("C2") = IE.document.getElementById("ctl04_ctlIlIlce").Value
IE.Visible = False
While IE.Busy
DoEvents
Wend
IE.Quit
End Sub
Ben hiç bir bilgim olmamasına rağmen belki saçma oldu ama aşağıda yer alan kodu yazdım ve çok güzel de çalışıyor. Yanlız a sütunundaki bütün verileri sorgulayıp b ve c sütunlarına atmasını istiyorum. Şu anda sadece a2 deki tc numarasından sorgu yapıyor ve b2 ye adresi c2 ye ilçeyi yazıyor.. bütün sütunu aynı anda sorgulayıp atmasını istiyorum.
Yardım ederseniz sevinirim..
Sub Arama()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://............................."
IE.Width = 1500
IE.Height = 1000
IE.Visible = False
While IE.Busy
DoEvents
Wend
IE.document.getElementById("ctl04_ctlTCKimlikNo").Value = Range("A2")
Application.Wait Now + TimeValue("00:00:02")
IE.Visible = False
While IE.Busy
DoEvents
Wend
Set TrackID = IE.document.getElementById("ctl04_ctlKpsAdresPageCommand_CommandItem_Search")
IE.document.getElementById("ctl04_ctlKpsAdresPageCommand_CommandItem_Search").Click
IE.Visible = False
While IE.Busy
DoEvents
Wend
Range("B2") = IE.document.getElementById("ctl04_ctlAdresBilgi").Value
Range("C2") = IE.document.getElementById("ctl04_ctlIlIlce").Value
IE.Visible = False
While IE.Busy
DoEvents
Wend
IE.Quit
End Sub