VBA Radio Button Selection in IE

mvemjsun

New Member
Joined
Feb 12, 2018
Messages
3
I am trying to select a drop down radio button in Internet Explorer but keep receiving the "Run-time error '424': Object Required" error.

Here is the code I am using

Code:
Sub Select_Cartons()

    ' Set a reference to 'Microsoft Internet Controls' under the VBA Tools\References menu
    Dim IE As InternetExplorer
    
    Set IE = New InternetExplorer
    
    IE.navigate "http://qfocus.odfl.com/ibi_apps/bip/portal/uat_TEST_IBPlan_Appt"
    IE.Visible = True
    Do
        DoEvents
    Loop Until IE.readyState = READYSTATE_COMPLETE
    
    IE.document.all("rd_drop_SHIPTYPE").Item(1).Checked = True
        
End Sub

Here is the HTML Code

HTML:
ShipmentsAll My DeliveriesAll My Appointments/RADAll My AppointmentsAll My Must Arrive By
</label></td></tr></tbody></table></div>
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
HTML:
All My DeliveriesAll My Appointments/RADAll My AppointmentsAll My Must Arrive By
</label></td></tr></tbody></table>
</div>
 
Upvote 0
[TABLE="width: 100%"]
<tbody>[TR]
[TD]<label id="rd_drop_SHIPTYPE_LABEL_0" style="cursor: default;" for="radio30"><input tabindex="21" id="rd_drop_SHIPTYPE0" type="radio" checked="" value="Deliveries" displaytext="All My Deliveries" name="rd_drop_SHIPTYPE">All My Deliveries</label>[/TD]
[/TR]
[TR]
[TD]<label id="rd_drop_SHIPTYPE_LABEL_1" style="cursor: default;" for="rd_drop_SHIPTYPE1"><input tabindex="21" id="rd_drop_SHIPTYPE1" type="radio" value="AppointRAD" displaytext="All My Appointments/RAD" name="rd_drop_SHIPTYPE">All My Appointments/RAD</label>[/TD]
[/TR]
[TR]
[TD]<label id="rd_drop_SHIPTYPE_LABEL_2" style="cursor: default;" for="rd_drop_SHIPTYPE2"><input tabindex="21" id="rd_drop_SHIPTYPE2" type="radio" value="Appointments" displaytext="All My Appointments" name="rd_drop_SHIPTYPE">All My Appointments</label>[/TD]
[/TR]
[TR]
[TD]<label id="rd_drop_SHIPTYPE_LABEL_3" style="cursor: default;" for="rd_drop_SHIPTYPE3"><input tabindex="21" id="rd_drop_SHIPTYPE3" type="radio" value="RAD" displaytext="All My Must Arrive By" name="rd_drop_SHIPTYPE">All My Must Arrive By[/HTML]</label>[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

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