Click this Radio Button NewBie

nbob

Board Regular
Joined
Nov 9, 2011
Messages
52
Need to click accept radio button then click submit button ?

HTML:
                  Accept
                  Decline
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Sorry need to decode the HTML...

input type=radio id="rdoTC" name="rdoTC" value="Y" accesskey="A
input type=radio id="rdoTC" name="rdoTC" value="N"

input type=button id="btnTC" name="btnTC" value="Submit" *******="javascript:return btnTC_*******()" accesskey="S"
 
Upvote 0
Hello nbob,

Are you using Internet Explorer and you want to click the button from VB?
Do you have any code you can post?
 
Upvote 0
Yes navigating IE and this screen is previous to the login screen at my URL. So far I have the following...


Code:
Sub GoToWebSiteAndEnterPWUN()

Dim appIE As Object ' InternetExplorer.Application
Dim sURL As String
Dim UserN As Variant, PW As Variant
Dim Element As Object ' HTMLButtonElement
Dim btnInput As Object ' MSHTML.HTMLInputElement
Dim Subframe As Object 
Set appIE = CreateObject("InternetExplorer.Application")

sURL = "http:myURL.asp"

With appIE
    .Navigate sURL
.Visible = True
'Click Radio Button ? ? ?


' enter username and password in textboxes
Set UserN = appIE.Document.getElementsByName("&txtTheAgent=")
If Not UserN Is Nothing Then UserN(0).Value = "myValue"
    
    
Set PW = appIE.Document.getElementsByName("&txtTheInitials=")
If Not PW Is Nothing Then PW(0).Value = "My Value"
    
    
Set PW2 = appIE.Document.getElementsByName("&txtThePassword")
If Not PW2 Is Nothing Then PW2(0).Value = "My Value!"
    

' click 'Submit' button
Set ElementCol = appIE.Document.getElementsByTagName("btnSubmit")

For Each btnInput In ElementCol
    If btnInput.Value = "Submit" Then btnInput.Click
  

Next
End with 
End Sub
My previous post contained the HTML for the Radio Button here is the HTML for my Login Page.

HTML:
PageBodyForm.txtMsgData.value  = "SIGNON" + 
        "&txtTheAgent="    + PageBodyForm.txtTheAgent.value + 
        "&txtTheInitials=" + PageBodyForm.txtTheInitials.value + 
        "&txtOR="          + PageBodyForm.txtOR.value;  

// 10-12-2007 Moved to DoPrepPage for mix case
//        "&txtThePassword=" + PageBodyForm.txtThePassword.value;
}
//-->
*********>
******** ******************** FOR=btnSubmit EVENT=*******>
  btnSubmit_*******()
//-->
*********>
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
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