I have an HTML in my Excel:
<form name="scform" action="online_range.aspx" autocomplete="off">
<input name="AcctNo" type="hidden" value="3949067512">
<table width="100%" border="0" cellpadding="3">
<tbody><tr>
<td width="6%"></td>
<td width="18%" align="center" valign="middle"><font color="#ffffff" face="verdana" size="1"><b>Numbers</b>
<td width="18%" align="right" valign="middle"><font color="#000000" face="verdana" size="1">**000,000,000,000.00**</font></td>
<td width="18%" align="right" valign="middle"><font color="#000000" face="verdana" size="1">**100,100,100,100.00**</font>
<td width="5%" align="center" valign="middle"><font color="#000000" face="verdana" size="1">
<!--<a href="javascript:document.scform.submit();" onmouseover="sctest('0479281963'); window.status='Account Details'; return true;">-->
<!-- INSERT BUILDMENU - APSMITH -->
<script>BuildMenu_SCPHP(0,'')</script>
<a onmouseover="showmenu(event,linksetSCPHP[0]); sctest(479281963, 'IM'); window.status='Account Details';" onmouseout="delayhidemenu()" href="javascript:document.scform.submit();">
<!-- END BUILDMENU - APSMITH -->
<img width="21" height="17" src="/images/detail2.gif" border="0"></a>
</font>
</td>
</tr>
</tbody></table></td>
<td width="3%"></td>
</tr></tbody></table></form>
I want to get the value from the td which is 000,000,000,000.00
and 100,000,000,000.00
but have no luck.
Here's what i tried:
Dim IE As New InternetExplorer
Dim Doc As HTMLDocument
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
'Navigate to Website
IE.navigate "https://secure1.bpiexpressonline.com/AuthFiles/login.aspx?URL=/direct_signin.htm"
'Loop until page load complete
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Set Doc = IE.document
Doc.getElementById("UserID").Value = Range("E23").Value
Doc.getElementById("Password").Value = Range("E24").Value
Doc.getElementById("login").submit
'Loop until page load complete
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
'Dim tb As Object, tr As Object, th As Object
Dim tb As Object
Set tb = Doc.getElementsByTagName("AcctNo")
what to do here? i tried getElementsById(td)(1) and so on, but no luck.
by using getElementsById(td)(n) there's no error but what the output is wrong, can someone help me or teach me how to parse form type.
thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…