VBA code to traverse Popup page on IE

aadityajain08

New Member
Joined
Nov 20, 2018
Messages
9
Hi,

I am new to the VBA and don't have any knowledge. I have an requirement where in i need to reset the defaults for the user. I am currently able to login to website, navigate to website and able to click on the link. Upon clicking the link, a popup window appear and i need to uncheck the flag on the popup window. I am not able to select any field on the popup page. To navigate on the parent page, i was using get element by id but seems same is not working on popup page.

Code to navigate on parent page:
Set varitm12 = IE.document.getelementbyid("ptifrmtgtframe").contentWindow.document.all.Item("OPR_DEF_PM_WRK_OPR_DEF_APVCHR_PB")
varitm12.Focus
varitm12.Click

I need to access the below element undr:

<input name="OPR_DEF_TBL_AP_PYMNT_RCRD_FLG$chk" id="OPR_DEF_TBL_AP_PYMNT_RCRD_FLG$chk" type="hidden" value="Y">
<input name="OPR_DEF_TBL_AP_PYMNT_RCRD_FLG" tabindex="30" class="PSCHECKBOX" id="OPR_DEF_TBL_AP_PYMNT_RCRD_FLG" type="checkbox" checked="checked" value="Y" *******="setupTimeout2(); this.form.OPR_DEF_TBL_AP_PYMNT_RCRD_FLG$chk.value=(this.checked?'Y':'N');doFocus_win0(this,false,true);"><label class="PSCHECKBOX" id="OPR_DEF_TBL_AP_PYMNT_RCRD_FLG_LBL" for="OPR_DEF_TBL_AP_PYMNT_RCRD_FLG">Record Payment</label>




Please suggest.

Regards:
Aditya
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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