LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Read Content From A Website

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Content in one coulumn using given content in another Colin Hayes Excel Worksheet Functions 4 March 28th 10 11:28 PM
How to transpose formulas from column content to row content. Notrom Excel Worksheet Functions 1 October 12th 06 06:57 PM
How to read text content of AS400 screen abc[_6_] Excel Programming 2 December 28th 05 11:53 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM


All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"