VBA, web automation, tick box in nested tables. Please Help!!

riley2013

New Member
Joined
Apr 16, 2013
Messages
4
Hello All
First of all i would like to say this site is brilliant i have learnt so much already :)

Im in need of a solution to a very specific problem.

Ok my situation so far i have a rather large program in vba that accesses a site (confidential info im afriad will post snippets though) logs in navigates through a rabbit warren of pages using different types div's form's a href's etc and finally get to one page before where i need to extract information from!!

My problem.

this webpage has one large table then nested tables within for each entry.
for example
Code:
[/COLOR][COLOR=#444444][FONT=Calibri]<table>[/FONT][/COLOR][COLOR=#444444][FONT=Calibri]<tr><td><table>info....</table></tr></td>[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri]<tr><td><table>info....</table></tr></td>[/FONT][/COLOR]
[COLOR=#444444][FONT=Calibri]<tr><td><table>info....</table></tr></td>[/FONT][/COLOR]

[COLOR=#444444][FONT=Calibri]</table>[/FONT][/COLOR][COLOR=#444444]

i need to find a way to search the data cells within the nested tables find a specific displayed value then if required tick the checkbox (which has dynamically genereated id's names etc) in that row then move on to the next table and do the same.

Wracking my brain with this one...

all i need to do is establish that one row has the data value i need and tick the check box that correlates (which is in the same row)

Code:
<table border="0" cellpadding="0" cellspacing="0">
              <tr class="altline">
                <td>
                  <table>
                    <tr>
                      <td class="col_time" title="16/04/2013">18:30</td>
                      <td class="col_duration">00:51</td>
                      <td class="col_placetype"></td>
                      <td class="col_place">**Data that needs to be checked against parameters**</td>
                      <td class="col_alerts"> </td>
                      <td class="col_action"> </td>
                      <td class="col_select">***The check box that needs to be selected if parameters are right***<input type="checkbox" id="chkactualid" name="chkactualid" *******="chkactualid_*******()" value="chk25262717idl"></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td>
                  <table>
                    <tr>
                      <td class="col_time" title="16/04/2013">17:37</td>
                      <td class="col_duration">00:53</td>
                      <td class="col_placetype">Restricted place</td>
                      <td class="col_place">**Data that needs to be checked against parameters**</td>
                      <td class="col_alerts"> </td>
                      <td class="col_action"> </td>
                      <td class="col_select">***The check box that needs to be selected if parameters are right***<input type="checkbox" id="chkactualid" name="chkactualid" *******="chkactualid_*******()" value="chk37764453idv"></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr class="altline">
                <td>
                  <table>
                    <tr>
                      <td class="col_time" title="16/04/2013">17:01</td>
                      <td class="col_duration">00:36</td>
                      <td class="col_placetype"></td>
                      <td class="col_place">**Data that needs to be checked against parameters**</td>
                      <td class="col_alerts"> </td>
                      <td class="col_action"> </td>
                      <td class="col_select">***The check box that needs to be selected if parameters are right***<input type="checkbox" id="chkactualid" name="chkactualid" *******="chkactualid_*******()" value="chk25262043idl"></td>
                    </tr>                 </table>

Obviously my vba code is enough to get me where i need to be, i just cant work out how to code this... im guessing its using the index array of the check box thats related to the table but guessing and coding? two completely different things.....much appreciation will go to anyone who has an idea!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
ok that screwed up admin please remove as it wont let me edit now, dont think i have anychoice but to repost.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

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