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: 2,836
Default Web query problems

Take a look at your other post.
I gave you an answer over there.



Regards,
Ryan---
--
RyGuy


"Don Guillett" wrote:

To add an external query, I just recorded this using a generic connection.
Now, just substitute your url to establish
your macro. Then modify the second for refresh so you don't overload your
file. Let me know if you need more help.
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 4/29/2008 by Donald B. Guillett
'

'
With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.yahoo.com",
_
Destination:=Range("A6"))
.Name = "www.yahoo"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
'==========
Sub Macro4()
'
' Macro4 Macro
' Macro recorded 4/29/2008 by Donald B. Guillett
'

'
Range("A6").Select
With Selection.QueryTable
.Connection = "URL;http://www.yahoo.com"
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Melwin" wrote in message
...
Hi Don and thank you for your answer.

The table is located on the following web page:

http://www.taloussanomat.fi/sivu.php...ge=bas icdata

The figure I need is in the table named "Kaupat". It is the first figure
in
the column "Hinta".

Couold you describe how I can access this information with a function and
use it in calculations?

Thanks.



--
Melwin


"Don Guillett" wrote:


You didn't post any of your attempts or url(s). One way to do this is
with
an external query. Place your cursor in the table you want to fetchright
clickimport to excel. dataexternal query
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Melwin" wrote in message
...
Hi,

Does anyone know any good tutorials for web queries using VBA? I need
to
retrieve data from a table located on a website (not whole table). How
should
I write the query? What is the basic structure of a web query?

The query will be part of a public function where i use one input that
will
be part of the website url from which the data is retrieved. The
function
output will be a number in double format.

If someone has some simple VBA code for this, please send it to me.

Thanks
--
Melwin




 
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
Problems with Web Query seegerp Excel Programming 0 September 26th 07 04:28 AM
Problems importing from an Access query Mike Excel Discussion (Misc queries) 0 June 20th 06 09:35 PM
javascript causing web query problems TonyH. Excel Programming 2 November 3rd 05 05:11 AM
Query problems Beau Considine Excel Discussion (Misc queries) 0 February 11th 05 04:20 PM
Query Problems Jennifer[_7_] Excel Programming 1 December 31st 03 09:37 PM


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