Ortak_Akıl
Yeni Üye
- Katılım
- 1 Haz 2023
- Mesajlar
- 225
- Çözümler
- 23
- Aldığı beğeni
- 105
- Excel V
- Office 2013 TR
YAKIT_BILGILERI sayfasına vba ile
<indirirkennaynı anda veya sonradan>
Akaryakıt fiyatları sayfasındaki tarihlerin yanına da yazmak istiyorum.
kod şu şekildedir.
yardımcı olur musunuz..
<indirirkennaynı anda veya sonradan>
Akaryakıt fiyatları sayfasındaki tarihlerin yanına da yazmak istiyorum.
kod şu şekildedir.
yardımcı olur musunuz..
C#:
Private Sub CommandButton1_Click()
On Error Resume Next
Dim oIE As InternetExplorer
Dim oHDoc As HTMLDocument
Const strURL As String = "EBİS Bildirim Sistemi"
'Application.ScreenUpdating = False
Application.EnableEvents = False
'Application.Calculation = xlCalculationManual
Application.Calculation = xlAutomatic
Application.DisplayAlerts = False
ss = Cells(Rows.Count, 2).End(xlUp).Row
If ss > 2 Then Range("C3:C" & ss).ClearContents
Set oIE = New InternetExplorer
With oIE
.Visible = False
.Navigate strURL
End With
Do While oIE.Busy = True Or oIE.readyState <> 4
DoEvents
Loop
Set oHDoc = oIE.Document
For i = 3 To ss
valTrh = CStr(Format(Cells(i, 2).Value2, " dd.mm.yyyy"))
If valTrh = "" Then Exit For
oHDoc.getElementById("bultenKriterleriForm:j_idt30_input").Value = valTrh
oHDoc.getElementById("bultenKriterleriForm:j_idt32").Click
Do While oIE.Busy = True Or oIE.readyState <> 4 Or oIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:01"))
With oHDoc.getElementsByTagName("table")(5)
Cells(i, 3).Value2 = CDbl(Evaluate(.Rows(3).Cells(1).innerText))
Cells(3, 5) = valTrh
Cells(4, 5) = "indirilen tarih"
End With
Next i
Cells(3, 5) = ""
Cells(4, 5) = ""
MsgBox "İşlem tamam.", vbInformation, "ExcelCozum.com"
oIE.Quit
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.DisplayAlerts = True
oIE.Quit
Set oIE = Nothing
Set oHDoc = Nothing
Set xlSht = Nothing
End Sub