LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to obtain the row count of a QueryTable from a Web query

I use a Web query to obtain a table on a Web page. How can I know the number
of rows in the result QueryTable?

The current code I use is as follows:

Sub Test()
Dim MyStr As String
MyStr = "URL;http://mySite/currentuser"
With ActiveSheet.QueryTables.Add(Connection:=MyStr, _
Destination:=Range("a10"))

.RowNumbers = True
.WebSelectionType = xlSpecifiedTables
.WebTables = "11"
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With


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
QueryTable.add naming problem (web query) PeacefulAnd4getful Excel Programming 2 August 27th 10 08:30 AM
Problem:Query Cell contain Formula from QueryTable is always get old value Resant Excel Programming 1 March 3rd 06 07:28 AM
Excel Web Query using a QueryTable via HTTPS?? Bing Excel Programming 2 April 2nd 05 03:51 PM
Bad QueryTable Row Count igneramos[_3_] Excel Programming 0 January 27th 04 10:21 PM
MS QUERY w/out querytable No Name Excel Programming 1 October 24th 03 03:55 PM


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