- Katılım
- 1 Mart 2005
- Mesajlar
- 22,248
- Excel Vers. ve Dili
-
Win7 Home Basic TR 64 Bit
Ofis-2010-TR 32 Bit
Merhaba.
Aşağıdaki kodlarda ilk butona bastığımda çalışıyor.
2nci defa basınca hata veriyor.
Nasıl yapmalıyım?
Hata veren satırı kırmızı ile boyadım.
Aşağıdaki kodlarda ilk butona bastığımda çalışıyor.
2nci defa basınca hata veriyor.
Nasıl yapmalıyım?
Hata veren satırı kırmızı ile boyadım.
Rich (BB code):
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim IE As Object, t As Object, j As Byte
IE = CreateObject("InternetExplorer.Application")
For j = 0 To 2
DataGridView1.Item(j, 0).Value = ""
Next
'IE.visible = True
IE.Navigate("https://www.haremaltin.com/")
Do While Not IE.readyState = 4
My.Application.DoEvents()
Loop
Do While IE.busy : My.Application.DoEvents() : Loop
t = IE.Document.GetElementbyId("table1").all(0)
For j = 0 To t.Rows(1).Cells.Length - 1
DataGridView1.Item(j, 0).Value = t.Rows(1).Cells(j).innertext
Next
t = Nothing
IE.Quit
IE = Nothing
MsgBox("bitti")
End Sub
End Class