Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI Dave
the piece of code u provided i tried pating it in a module in a n excel sheet and then in workbook_open i called that function, by which it opened internet explorer and showed the webpage pointing in the code. but i want the data in the excel sheet.. and am i going the right way in executing the following code provided by you. else guide me throught the steps. thanks Pramod Mehta "Dave Miller" wrote: Pramod, The code below worked for me: Regards, David Miller Function GetPrices() Dim ie As Object, _ l, J As Long, _ r As Range Set ie = CreateObject("InternetExplorer.Application") With ie .Visible = True .navigate "http://www.thebulliondesk.com/" & _ "RHS_CHARTS.aspx?Chart=Fix" Do Until .readystate = 4 DoEvents Loop With .document.all For l = 0 To .Length If .Item(l).classname = "td" Then Set r = Range("A65536").End(xlUp).Offset(1, 0) Select Case .Item(l).innertext Case "Gold" For J = 0 To 5 r.Offset(0, J).Value = .Item(l + J).innertext Next J Case "Silver" For J = 0 To 5 r.Offset(0, J).Value = .Item(l + J).innertext Next J GoTo PricesExit End Select End If Next End With End With PricesExit: Set r = Nothing Set ie = Nothing End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Content in one coulumn using given content in another | Excel Worksheet Functions | |||
How to transpose formulas from column content to row content. | Excel Worksheet Functions | |||
How to read text content of AS400 screen | Excel Programming | |||
How can a file be converted from Read-Only to Read/Write | Excel Discussion (Misc queries) |