943,822 Members | Top Members by Rank

Ad:
Mar 5th, 2009
0

count element in table html

Expand Post »
http://www.x-rates.com/cgi-bin/cgica...lue=1&base=EUR
Based the link how to count element in table of this page?

note: is the table where are all currency values

tks.

in vba please
Last edited by sal21; Mar 5th, 2009 at 8:41 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sal21 is offline Offline
22 posts
since Feb 2008
Mar 5th, 2009
0

Re: count element in table html

Click to Expand / Collapse  Quote originally posted by sal21 ...
http://www.x-rates.com/cgi-bin/cgica...lue=1&base=EUR
Based the link how to count element in table of this page?

note: is the table where are all currency values

tks.

in vba please
What technology are you using to view/download the document?
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Mar 5th, 2009
0

Re: count element in table html

Click to Expand / Collapse  Quote originally posted by vb5prgrmr ...
What technology are you using to view/download the document?
vba for excel.
piece of my code to connect:

Set oIE = CreateObject("InternetExplorer.Application")

With oIE

'For lngRow = 1 To lngMaxRow

' PAGINA = 1
' ABI = Empty
' ABI = WS.Range("B" & lngRow)

'If WS.Range("C" & lngRow) = Empty Then

URL = "http://www.x-rates.com/cgi-bin/cgicalc.cgi?value=1&base=EUR"
Debug.Print URL
.Visible = True
.Navigate (URL)

Do While .Busy
DoEvents
Loop

Do While .ReadyState <> 4
DoEvents
Loop

.....

ecc...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sal21 is offline Offline
22 posts
since Feb 2008
Mar 5th, 2009
0

Re: count element in table html

Okay, at first I thought this might be tough to do since it is a spawned application, but... It was easier than I thought. Add these variables at the top.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim C, I As Integer
and then after your readystate check add this
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. For Each C In .Document.links
  2. I = I + 1
  3. Next C
  4. MsgBox I

Now, as you can see, "C" is a varient and "I" is used for counting the links. Also, I tried .Document.Links.Count but that is not supported so you have to enumerate through them to get the count.

Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Template Crystal report and VB6
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Media Player load in game





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC