Internet Explorer child window in VBA

bit1986

New Member
Joined
Nov 10, 2015
Messages
13
Hi,

I am working in an accountant firm so my programming skills are yet to be developed.
We are trying to create a web automation using IE.
However, there are several items (buttons and textboxes), which are under several tabs:

HTML:
                                  </table>    <div id="page-wrap">               <div id="tabs" style="display: none;">            <br />            <ul style="z-index: 1; left: 19px; top: 20px; /*position: absolute;*/ height: 33px; width: 1053px"                id="TabNames">                <li><a href="#fragment-1" style="width: 205px;">  Assignment Information </a>                </li>                <li><a href="#fragment-2" style="width: 205px;">  Country Information </a>                </li>                <li><a href="#fragment-3" style="width: 205px;">  Compensation</a> </li>                <li><a href="#fragment-4" style="width: 205px;">Overrides</a></li>

One of the buttons have the same ID, and when pressing the button - we are moving to the next tab, however, when pressing again on the button - nothing is happening (maybe since the focus is on the first tab):

the button on the first tab:
HTML:
<button tabindex="16" class="next-tab mover" id="btnSaveAndContinue" *******="return SendForm();" rel="2" onclientclick="needToConfirm=false;">Save & Continue »</button>

the button on the second tab:
HTML:
<button tabindex="16" class="next-tab mover" id="btnSaveAndContinue" *******="return SendForm();" rel="3" onclientclick="needToConfirm=false;">Save & Continue »</button>

We tried to use the following code, with no success:
HTML:
Dim finalout As VariantDim dd As HTMLObjectElement
Set dd = ie.Document.getElementById("fragment-2")
dd.getElementsByClassName("next-tab mover")(1).Click

We would appreciate your help with this issue, since this is the only thing that preventing us from operating our new project.

Thank you in advance,
David
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Guys,
I might posted a misleading title to the thread,
The problem is that we have tables that are located in different tabs.
How can we reach a specific element in a table, which is located in a specific tab?

Thanks,
David
 
Upvote 0
Hi Guys,

It would be highly appreciated if someone could assist my with this issue.
I just want to know how can i insert data/press a button in another tab or another table of a website.

Thank you in advance.

David
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,055
Latest member
excelhelp12345

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