aydgur
Altın Üye
- Katılım
- 31 Ekim 2005
- Mesajlar
- 447
- Excel Vers. ve Dili
- Excel 2007 Türkçe
- Altın Üyelik Bitiş Tarihi
- 04-03-2028
İyi günler arkadaşlar tcmb sistem değiştirdiği için kurları artık çekmiyor. Ne gibi değişiklik yapmak gerekir acaba ?.
Sub TCMB()
Dim XDoc As Object, strURL As String
Dim myList As Object
Dim Num As Byte
Set XDoc = CreateObject("MSXML2.DOMDocument")
XDoc.async = False
XDoc.validateOnParse = False
strURL = "http://www.tcmb.gov.tr/kurlar/today.xml"
XDoc.Load strURL
Set myList = XDoc.SelectNodes("Tarih_Date/Currency")
If myList.Length = 0 Then GoTo SafeExit:
Num = myList.Length - 1
Range("A5:G" & Num) = ""
For i = 0 To Num
Cells(i + 5, 1) = i + 1 & ") "
Cells(i + 5, 2) = myList(i).SelectSingleNode("Isim").Text
Cells(i + 5, 3) = myList(i).getAttribute("Kod")
Cells(i + 5, 4) = myList(i).SelectSingleNode("ForexBuying").Text
Cells(i + 5, 5) = myList(i).SelectSingleNode("ForexSelling").Text
Cells(i + 5, 6) = myList(i).SelectSingleNode("BanknoteBuying").Text
Cells(i + 5, 7) = myList(i).SelectSingleNode("BanknoteSelling").Text
Next
' For i = 0 To Num
' Cells(i + 5, 1) = i + 1 & ") "
' Cells(i + 5, 2) = myList(i).ChildNodes(1).Text
' Cells(i + 5, 3) = myList(i).getAttribute("Kod")
' Cells(i + 5, 4) = myList(i).ChildNodes(3).Text
' Cells(i + 5, 5) = myList(i).ChildNodes(4).Text
' Cells(i + 5, 6) = myList(i).ChildNodes(5).Text
' Cells(i + 5, 7) = myList(i).ChildNodes(6).Text
' Next
SafeExit:
Set myList = Nothing
Set XDoc = Nothing
Sheets("DURUM").Select
[a1].Select
End Sub
Sub AUTO_OPEN()
Worksheets("Gunluk_Kurlar").Select
MsgBox "Önce Kurları Bekleyin "
Call TestXML_3
Sheets("DURUM").Select
[a1].Select
End Sub
Sub TCMB()
Dim XDoc As Object, strURL As String
Dim myList As Object
Dim Num As Byte
Set XDoc = CreateObject("MSXML2.DOMDocument")
XDoc.async = False
XDoc.validateOnParse = False
strURL = "http://www.tcmb.gov.tr/kurlar/today.xml"
XDoc.Load strURL
Set myList = XDoc.SelectNodes("Tarih_Date/Currency")
If myList.Length = 0 Then GoTo SafeExit:
Num = myList.Length - 1
Range("A5:G" & Num) = ""
For i = 0 To Num
Cells(i + 5, 1) = i + 1 & ") "
Cells(i + 5, 2) = myList(i).SelectSingleNode("Isim").Text
Cells(i + 5, 3) = myList(i).getAttribute("Kod")
Cells(i + 5, 4) = myList(i).SelectSingleNode("ForexBuying").Text
Cells(i + 5, 5) = myList(i).SelectSingleNode("ForexSelling").Text
Cells(i + 5, 6) = myList(i).SelectSingleNode("BanknoteBuying").Text
Cells(i + 5, 7) = myList(i).SelectSingleNode("BanknoteSelling").Text
Next
' For i = 0 To Num
' Cells(i + 5, 1) = i + 1 & ") "
' Cells(i + 5, 2) = myList(i).ChildNodes(1).Text
' Cells(i + 5, 3) = myList(i).getAttribute("Kod")
' Cells(i + 5, 4) = myList(i).ChildNodes(3).Text
' Cells(i + 5, 5) = myList(i).ChildNodes(4).Text
' Cells(i + 5, 6) = myList(i).ChildNodes(5).Text
' Cells(i + 5, 7) = myList(i).ChildNodes(6).Text
' Next
SafeExit:
Set myList = Nothing
Set XDoc = Nothing
Sheets("DURUM").Select
[a1].Select
End Sub
Sub AUTO_OPEN()
Worksheets("Gunluk_Kurlar").Select
MsgBox "Önce Kurları Bekleyin "
Call TestXML_3
Sheets("DURUM").Select
[a1].Select
End Sub