![]() |
geting data from internet
hi
i have found this examble: Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.dr.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "Vejret") intSlut = InStr(intStart, sPage, "læs mere") Info = Mid(sPage, intStart, intSlut - intStart + 8) MsgBox Info End Sub But get an error in Info = Mid(sPage, intStart, intSlut - intStart + 8) To bee honest i don't know what the script do all the way regards alvin |
geting data from internet
Hi again
Please look at http://www.valutakurser.dk here there are what elsm. a Usdollar are in Danish and many other contries, how can i get this data into my excel Sheet? Or can i do that ? Regards Alvin "alvin Kuiper" wrote: hi i have found this examble: Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.dr.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "Vejret") intSlut = InStr(intStart, sPage, "læs mere") Info = Mid(sPage, intStart, intSlut - intStart + 8) MsgBox Info End Sub But get an error in Info = Mid(sPage, intStart, intSlut - intStart + 8) To bee honest i don't know what the script do all the way regards alvin |
geting data from internet
Experiment with data--get external data--New Web Query
Hans |
geting data from internet
One way is to open the page
Sub test() Workbooks.Open "http://www.valutakurser.dk/" End Sub And delete the columns you not want -- Regards Ron de Bruin http://www.rondebruin.nl "alvin Kuiper" wrote in message ... hi i have found this examble: Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.dr.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "Vejret") intSlut = InStr(intStart, sPage, "læs mere") Info = Mid(sPage, intStart, intSlut - intStart + 8) MsgBox Info End Sub But get an error in Info = Mid(sPage, intStart, intSlut - intStart + 8) To bee honest i don't know what the script do all the way regards alvin |
geting data from internet
Hi Ron
I don'rt no why but if i try this i don't get data in my sheet well yes i get data but not the currency I have try with Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.valutakurser.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "<!-- Nationalbankens Middelkurser - Start --") intSlut = InStr(intStart, sPage, "<!-- Nationalbankens Middelkurser - Slut --") Info = Mid(sPage, intStart, intSlut - intStart) MsgBox Info End Sub but dont know what to do Alvin "Ron de Bruin" wrote: One way is to open the page Sub test() Workbooks.Open "http://www.valutakurser.dk/" End Sub And delete the columns you not want -- Regards Ron de Bruin http://www.rondebruin.nl "alvin Kuiper" wrote in message ... hi i have found this examble: Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.dr.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "Vejret") intSlut = InStr(intStart, sPage, "læs mere") Info = Mid(sPage, intStart, intSlut - intStart + 8) MsgBox Info End Sub But get an error in Info = Mid(sPage, intStart, intSlut - intStart + 8) To bee honest i don't know what the script do all the way regards alvin |
geting data from internet
Hi Alvin
Download the workbook examples from this book http://www.wrox.com/WileyCDA/WroxTit...load_code.html There is a file named ExchangeRates.xls -- Regards Ron de Bruin http://www.rondebruin.nl "alvin Kuiper" wrote in message ... Hi Ron I don'rt no why but if i try this i don't get data in my sheet well yes i get data but not the currency I have try with Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.valutakurser.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "<!-- Nationalbankens Middelkurser - Start --") intSlut = InStr(intStart, sPage, "<!-- Nationalbankens Middelkurser - Slut --") Info = Mid(sPage, intStart, intSlut - intStart) MsgBox Info End Sub but dont know what to do Alvin "Ron de Bruin" wrote: One way is to open the page Sub test() Workbooks.Open "http://www.valutakurser.dk/" End Sub And delete the columns you not want -- Regards Ron de Bruin http://www.rondebruin.nl "alvin Kuiper" wrote in message ... hi i have found this examble: Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.dr.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "Vejret") intSlut = InStr(intStart, sPage, "læs mere") Info = Mid(sPage, intStart, intSlut - intStart + 8) MsgBox Info End Sub But get an error in Info = Mid(sPage, intStart, intSlut - intStart + 8) To bee honest i don't know what the script do all the way regards alvin |
geting data from internet
Thanks Ron
Regards Alvin "Ron de Bruin" wrote: Hi Alvin Download the workbook examples from this book http://www.wrox.com/WileyCDA/WroxTit...load_code.html There is a file named ExchangeRates.xls -- Regards Ron de Bruin http://www.rondebruin.nl "alvin Kuiper" wrote in message ... Hi Ron I don'rt no why but if i try this i don't get data in my sheet well yes i get data but not the currency I have try with Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.valutakurser.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "<!-- Nationalbankens Middelkurser - Start --") intSlut = InStr(intStart, sPage, "<!-- Nationalbankens Middelkurser - Slut --") Info = Mid(sPage, intStart, intSlut - intStart) MsgBox Info End Sub but dont know what to do Alvin "Ron de Bruin" wrote: One way is to open the page Sub test() Workbooks.Open "http://www.valutakurser.dk/" End Sub And delete the columns you not want -- Regards Ron de Bruin http://www.rondebruin.nl "alvin Kuiper" wrote in message ... hi i have found this examble: Sub HentInfo() Dim oIE As SHDocVw.InternetExplorer Dim sPage As String Dim intStart, intSlut As Long Dim Info As String Set oIE = New SHDocVw.InternetExplorer oIE.Navigate "http://www.dr.dk" Do Until oIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop sPage = oIE.Document.body.InnerHtml intStart = InStr(1, sPage, "Vejret") intSlut = InStr(intStart, sPage, "læs mere") Info = Mid(sPage, intStart, intSlut - intStart + 8) MsgBox Info End Sub But get an error in Info = Mid(sPage, intStart, intSlut - intStart + 8) To bee honest i don't know what the script do all the way regards alvin |
All times are GMT +1. The time now is 06:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com