LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default retrieve data from web

VBA demo for importing a webpage into Excel
(This will import this discussion into Excel. Not very pretty, but
good enough to extract any desired data out of the imported web page)

Private Sub Webpageimportexample()
Dim uri As String
Dim ws As Worksheet
uri = "URL;" & "http://groups.google.com/group/
microsoft.public.excel.programming/browse_thread/thread/
f39346eab6de8d55?hl=en"
Err.Clear
Set ws = Worksheets.Add
With ws.QueryTables.Add(Connection:=uri,
Destination:=ws.Range("A1"))
.Refresh (False)
End With
err_num = Err.Number
If err_num < 0 Then
If err_num = 1004 Then
x = MsgBox("no connection", vbCritical, "web page
retrieval")
Else
x = MsgBox("Error while updating: " + CStr(err_num),
vbCritical, "web page retrieval")
End If
End If
End Sub
 
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
Retrieve whole row of data manxman Excel Worksheet Functions 9 May 5th 09 03:19 AM
Retrieve multiple data rows data from a very long list and copy t mathew Excel Discussion (Misc queries) 1 September 13th 06 08:24 PM
How to retrieve data from web? [email protected] Excel Programming 4 February 23rd 06 09:09 PM
Retrieve data Matt W via OfficeKB.com Excel Discussion (Misc queries) 1 July 14th 05 06:40 PM
retrieve data Lolly[_2_] Excel Programming 1 October 3rd 04 02:46 PM


All times are GMT +1. The time now is 06:45 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"