VB Code to URL in iFrame

Stonesteel

Board Regular
Joined
Apr 27, 2010
Messages
81
Greetings!

I am currently working in automation for my daily work routine, I have come up with the code to automate the entry of reference number. My problem is how to automatically click the url with varying value, this is the scenario:

First is by clicking the command button, it will direct me to the website, then will go to the specific page, will enter the data to be queried, then will click the submit button, after that iframe will appear with the result of the query, then that is my problem started.

here is the screenshot of the scenario.
iframe00.jpg


now, what I need is a vb code to click one of the SO number to view it's information. for example by either clicking the SO number 886236 (tabindex=2) or it's History (tabindex=3) -they both display same info.

here is the html source of that iframe.
iframe01.jpg



>TD style="HEIGHT:6.35mm;" class="a51c">DIV class="a51">SO/DIV>/TD>
>TD class="a55c">DIV class="a55">Type/DIV>/TD>
>TD class="a59c">DIV class="a59">Status/DIV>/TD>

>TD class="a63c">DIV ID="66iT0">TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
LANG="en-US">TR>
>TD class="a63">Scheduled Date/TD>TD style="vertical-align:top">
tabindex="1" style="cursor:pointer;"
*******="ClientReportc5dfad5ffe6a404cbb574af8bb7790ce.ActionHandler('Sort','66iT0_A'
);return false;" onkeypress="if(event.keyCode == 13 || event.which ==
13){ClientReportc5dfad5ffe6a404cbb574af8bb7790ce.ActionHandler('Sort','66iT0_A');}re
turn false;">IMG BORDER="0"
SRC="/Reserved.ReportViewerWebControl.axd?ReportSession=jwy5zeenzif220u2jfn1u345&amp
;ControlID=c5dfad5ffe6a404cbb574af8bb7790ce&Culture=1033&UICulture=1033&
ReportStack=1&OpType=ReportImage&ResourceStreamID=10.0.2531.0
((Katmai_PCU_Main).090329-1045 )unsorted.gif"


>TD class="a67c">DIV class="a67">Contractor Name/DIV>/TD>
>TD class="a71c">DIV class="a71">Installer Name/DIV>/TD>
>TD class="a75c">DIV class="a75">View History/DIV>/TD>/TR>

>TR VALIGN="top">
>TD style="HEIGHT:6.35mm;" class="a80c">DIV class="a80">a tabindex="2"
href="javascript:void(************('http://10.123.3.189/CSPIS_CRG/AccountSoDetails.as
px?SoID=860110','AccountHistory','width=500,height=500,resizable=yes,menubar=yes,sta
tus=no,scrollbars=yes'))" style="color:SteelBlue"
TARGET="_top">886236/a>/DIV>/TD>

>TD class="a84c">DIV class="a84">Technical Support/DIV>/TD>
>TD class="a88c">DIV class="a88">Resolved/DIV>/TD>
>TD class="a92c">DIV class="a92">03/13/2012/DIV>/TD>
>TD class="a96c">DIV class="a96">USEDC - MAKATI/DIV>/TD>
>TD class="a100c">DIV class="a100">THOMAS JEFFERSON MABILIN LAMIGO/DIV>/TD>

>TD class="a104c">DIV class="a104">a tabindex="3"
href="javascript:void(************('http://10.123.3.189/CSPIS_CRG/AccountSoHistory.as
px?SoID=860110','AccountSoHistory','width=500,height=500,resizable=yes,menubar=yes,s
tatus=no'))" style="color:SteelBlue" TARGET="_top">History/a>/DIV>/TD>/TR>

>TR VALIGN="top">
>TD style="HEIGHT:6.35mm;" class="a80c">DIV class="a80">a tabindex="4"
href="javascript:void(************('http://10.123.3.189/CSPIS_CRG/AccountSoDetails.as
px?SoID=438864','AccountHistory','width=500,height=500,resizable=yes,menubar=yes,sta
tus=no,scrollbars=yes'))" style="color:SteelBlue"
TARGET="_top">459168/a>/DIV>/TD>

>TD class="a84c">DIV class="a84">Reinstall/DIV>/TD>
>TD class="a88c">DIV class="a88">Reinstalled/DIV>/TD>
>TD class="a92c">DIV class="a92">05/03/2011/DIV>/TD>
>TD class="a96c">DIV class="a96">USEDC - MAKATI/DIV>/TD>
>TD class="a100c">DIV class="a100">THOMAS JEFFERSON MABILIN LAMIGO/DIV>/TD>

>TD class="a104c">DIV class="a104">a tabindex="5"
href="javascript:void(************('http://10.123.3.189/CSPIS_CRG/AccountSoHistory.as
px?SoID=438864','AccountSoHistory','width=500,height=500,resizable=yes,menubar=yes,s
tatus=no'))" style="color:SteelBlue" TARGET="_top">History/a>/DIV>/TD>/TR>

>TR VALIGN="top">
>TD style="HEIGHT:6.35mm;" class="a80c">DIV class="a80">a tabindex="6"
href="javascript:void(************('http://10.123.3.189/CSPIS_CRG/AccountSoDetails.as
px?SoID=436462','AccountHistory','width=500,height=500,resizable=yes,menubar=yes,sta
tus=no,scrollbars=yes'))" style="color:SteelBlue"
TARGET="_top">457360/a>/DIV>/TD>

>TD class="a84c">DIV class="a84">Pullout Relocation/DIV>/TD>
>TD class="a88c">DIV class="a88">Pulled Out/DIV>/TD>
>TD class="a92c">DIV class="a92">04/25/2011/DIV>/TD>
>TD class="a96c">DIV class="a96">USEDC - MAKATI/DIV>/TD>
>TD class="a100c">DIV class="a100">MICHAEL GERONA AMADOR/DIV>/TD>

>TD class="a104c">DIV class="a104">a tabindex="7"
href="javascript:void(************('http://10.123.3.189/CSPIS_CRG/AccountSoHistory.as
px?SoID=436462','AccountSoHistory','width=500,height=500,resizable=yes,menubar=yes,s
tatus=no'))" style="color:SteelBlue" TARGET="_top">History/a>/DIV>/TD>/TR>

I'm thinking if there's a vb code to click the SO number or History (in bold black) by either referencing to tabindex (highlighted in blue) or by href (highlighted in green)





 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,216,180
Messages
6,129,340
Members
449,505
Latest member
Alan the procrastinator

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top