Option button click on IE is not working

I am trying to play around with Excel VBA code to select an option button on a webpage. For some reason the option button is not getting selected even though there is no errors when executing the code. Please share your thoughts.
Excel VBA code block given below.
Sub Voting()
Dim MyHTML_Element As IHTMLElement
Dim MyURL As String
Dim x As Object
MyURL = "https://www.surveymonkey.com/r/?sm=%2bZAmxFYpsYG1R61ELcYA6g%3d%3d"
Set MyBrowser = New InternetExplorer
With MyBrowser
.Silent = True
.navigate MyURL
.Visible = True
Do
Loop Until .readyState = READYSTATE_COMPLETE
Do Until Not x Is Nothing
Set x = .document.getElementById("ID of one of the option button")
Loop
Set x = Nothing
.document.getElementById("ID of one of the option button").Click
Set HTMLDoc = .document
For Each MyHTML_Element In HTMLDoc.getElementsByTagName("button")
If MyHTML_Element.Type = "submit" Then MyHTML_Element.Click: Exit For
Next
Set HTMLDoc = Nothing
End With
MyBrowser.Quit
Set MyBrowser = Nothing
End Sub

You must not be hitting the button.  Please see this example.
http://vbadud.blogspot.com/2009/08/how-to-login-to-website-using-vba.html
Also, to dump everything from the site to Excel, try this.
Sub DumpData()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
URL = "http://finance.yahoo.com/q?s=sbux&ql=1"
'Wait for site to fully load
IE.Navigate2 URL
Do While IE.Busy = True
DoEvents
Loop
RowCount = 1
With Sheets("Sheet1")
.Cells.ClearContents
RowCount = 1
For Each itm In IE.document.all
.Range("A" & RowCount) = itm.tagname
.Range("B" & RowCount) = itm.ID
.Range("C" & RowCount) = itm.classname
.Range("D" & RowCount) = Left(itm.innertext, 1024)
RowCount = RowCount + 1
Next itm
End With
End Sub
Joel, who frequents these forums, gave me that a long time ago.  It's server me well for many projects.
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Similar Messages

  • "Photos" option button in icloud control panel not working

    Photos option button in icloud control panel not working...it is not greyed out, and it is ticked, but clicking on it has no effect. Windows 8.

    luvsack wrote:
    DOES ANYBODY RESPOND TO THESE QUESTIONS EVER? I HAVE THE SAME PROBLEM AND CAN FIND NO ANSWER ANYWHERE! ANSWER THE **** QUESTION PLEASE!!!!!!!!!!!!!!!!!!!!!!!
    Windows 7 64
    Start your own thread, and please stop shouting, it is hard to read, and who wants that.

  • I need to re-download Lion and install it. Holding the Option key while clicking on "purchases" does not work.

    I need to re-download Lion and install it, after re-formatting my hard-drive to "journaled" as requested. Holding the Option key while clicking on "purchases" does not work.

    Thanks Smokemonster. I found that the Lion install app was in in my applications folder already. Worked fine.

  • The click at touchpad is not working, please help!!!

    I use Macpro, recently the click at touchpad is not working, please help!!! Thank you !!

    For this issue AppleCare support told me to so a SMC reset as follows:
    Power the machine OFF.
    At the SAME TIME hold down the following buttons:
    Shift
    Control
    Option
    Power
    Then release all buttons.  Power up the Macbook and see if the trackpad button work.
    Hope this helps.
    Bill

  • Navigation "Back" and "Forward" buttons are inactive, they do not work at all. How do I fix this?

    I have downloaded the latest version of firefox and the navigation buttons in the browser will not work in any way. The "Back" and "Forward" buttons are completely un-usable.

    Toolbar misbehavior could be due to a problematic add-on (e.g., theme or extension), or a corrupted settings file. Next time you upgrade -- and for security reasons, it is highly recommended -- try Firefox's Safe Mode to see whether you can pin it on an add-on or custom setting. You also could clear your toolbar settings.
    More info on Safe Mode:
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.org/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, restart Firefox in [http://support.mozilla.org/kb/Safe+Mode Safe Mode] using
    Help > Restart with Add-ons Disabled
    In the Safe Mode dialog, do not check any boxes, just click "Continue in Safe Mode."
    Does the toolbar work correctly?
    More info on clearing toolbar settings: [[Toolbar keeps resetting]]

  • None of the buttons on my Torch will not work - phone inoperable

    The buttons on my Torch will not work...I can receive calls but can't answer them. I cannot do anything with the phone...it is fully charged - HELP! I am traveling and this is now critical!

    I don't have a 9800 here to test, but if you keep the keyboard closed, isn't there a onscreen enter key?
    Normally the buttons not workng is indicative of moisture issues. It sounds like what I have seen multiple times on a device with moisture damage.
    Even sitting on a bathroom counter during a hot steamy shower or bath can cause keyboard and trackball problems UNTIL properly dried out. It really is more common than you think.
    1. Remove the battery immediately!! Do not attempt to turn on your BlackBerry.
    2. Let the device dry in a warm, dry place for 3 to 5 days* (see below)
    3. DO NOT "check it each day" by placing the battery in. Leave it be to dry completely. This takes time. Replacing the battery to check it can only damage it more (moisture + electrical current = disaster).
    4. If the device is warm after the drying period, allow it to cool to room temperature before placing the battery back in.
    Suggestions on drying your BlackBerry in a warm place (open, with the battery out):
    *Place the BB in a container of dry UNcooked rice, and then you might also place it in any of the locations mentioned below.
    *On top of any dry heat emitting electronic component: TV cabinet or CRT, LCD, cable TV/Satellite converter box or plasma monitor
    *On the dashboard of your car on a sunny day
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • My power button on my iphone is not working. What can i do about that?

    my power button on my iphone is not working. What can i do about that?

    Meaning that you cannot restart or reset the phone?  If you haven't tried already, try both options.
    Otherwise, you can do a backup & restore, or even a restore as new (only after a successful backup).
    If the issue persists, then look at a replacement. Either it will be a hardware defect (free if within warranty), or physical damage ($49 with AppleCare Plus, $149 without it.)

  • How do I reject incoming calls on Ios7 when locked? Power button on top right does not work.

    How do I reject incoming calls on Ios7 when locked? Power button on top right does not work.

    I am also facing the same issues. Sometime i get an option to reject call and sometime i won't .
    Tried all the basic troubleshooting i could from my end but nogo. Also tried complete reset by loosing data still the same results. Any suggestions and fix, Apple ???

  • My iphone 4's display is completely blackout and even its battery is not charging. I tried to restart my iPhone by pressing home and on/off button but it is also not worked. Now I'm in Nepal and here not even a single apple service center. What to do? Ple

    Its been one month, my iphone 4's display is completely blackout and even its battery is not charging. I tried to restart my iPhone by pressing home and on/off button but it is also not worked. Now I'm in Nepal and here not even a single apple service center. What to do? Please help me.

    You clearly did not notice that you have joined a USER TO USER COMMUNITY FORUM
    This is NOT Apple ,Apple do not read nor do they  therefore respond
    So if you would like to wind your neck in ........................
    try a reset of iPhone and then a restore,best, as new and if it then functions correctly try restoring with your backup

  • I have iOS7 on my iPhone4. I turned on the Voice Over option and now my phone is not working at all. At first it was freezing and not accepting any commands. Now all I have is a blank sceen. I can't get back into it. Any ideas what happened here?

    I have iOS7 on my iPhone4. I turned on the Voice Over option and now my phone is not working at all. At first it was freezing and not accepting any commands. Now all I have is a blank sceen. I can't get back into it. Any ideas what happened here?

    Hi Jeffny01,
    If your iPhone is not responding, you may find the following article helpful:
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Regards,
    - Brenden

  • My app store is not working. I followed instructions to hold wake/sleep   home button....did not work, I went into settings, general, reset network settings....didn't work...now what?

    My app store is not working. I followed instructions to hold wake/sleep   home button....did not work, I went into settings, general, reset network settings....didn't work...now what?

    Did you try to go to Settings > Store, tap on Apple ID, Log out and Login again.
    What message do you get when you open the App Store?

  • Skype click to call is not working in Safari 6 wit...

    My Skype click-to call is not working on Safari 6 with OS X 10.7.4.  The number highlights, but when I click on the number, nothing happens. I do have Skype installed on the computer and it works fine. I am running Skype for the mac 5.8.0.1027 and skype extension for safari 2.1.0.10405. I have two other macs which are running OS X 10.6.8 and Safari 5.1.7 and the click to call (2.1.0.10405) works great on both of those. I can not get it to work on the mac running Lion. Any help? Thanks

    I reverted back to Safari 5.1.7 from Safari 6 and now Click To Call works.
    For anyone wondering how I did this, you can view instructions here:
    http://apple.stackexchange.com/posts/59342/revisions
    I am new to using Macs and was able to follow these simple instructions. Takes a while for Pacifist to install 5.1.7, but it's worth it to have Click To Call working now.
    You will not be able to do this if you have Mountain Lion as Mountain Lion requires Safari 6.
    Lastly, the next time you update your Mac and it asks if you want to upgrade to Safari 6, say NO. At least not until you see that a fix has been posted here in these forums by either Skype or Apple.
    P.S. I posted this reply using OSX 10.7.4 and Safari 5.1.7

  • Why copy option from recent call numbers is not working on ios7 [recent call logs in phone]?

    why copy option from recent call numbers is not working on ios7 [recent call logs in phone]?

    Here is a copy of my expressions and a copy of my data. The expressions match up going from left to right
    Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4"))
    sum(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4")))
    count(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4")))
    PUBLIC SHARED FUNCTION CalcPTD2(LookupArray AS OBJECT) AS INTEGER
         DIM i,Total AS INTEGER
         Total = 0
         FOR i = 0 to UBOUND(LookupArray)
               Total = Total + CINT(LookupArray(i))
         NEXT i
     NumberTimes  =   NumberTimes +1
    RETURN  Total
    END FUNCTION

  • Radio button and associated functionality is not working!

    Hi Pros,
    I am facing the following problem:
    1.I have an interactive PDF created in Acrobat 9 Pro.
    2.PDF have few radio buttons, each radio buttons ahave assigned valus(eg: 1,2,3 etc)
    3.I have a text box in which the value of selected radio button is displayed.
    4.PDF is working fine on my machine.
    5.Client is having Internet Explorer version 7.0.5 and Adobe reader:8.2.6
    6.The radio buttons and associated functionality is not working on client's machine.
    7.The text box shows '0' even if we a radio button with value 2 or 1 is selected.
    What will be the problem? How can I fix this issue?
    Please help.

    Thanks alot for helping me on this.
    Thanks to u also ~graffiti

  • Right click context menu is not working in flash player 10 and above

    In right click custom context menu i have create like "A" if i click "A" i have attached one movie clip in that movie clip right click, i have custom context menu like "Remove A" this is working fine in flash player 9 and below. But flash player 10 and above fisrt "A" is working fine but in that movieclip clip right click "Remove A" is not working Please guide me regarding this issue.
    Thanks in Advance
    Surendran S

    The problem is that Google has an onmousedown attribute added to the links that modify a link if you click or right-click a result link to make the link point to a safe browsing check on the Google server.<br />
    You can see that if you hover a link and you will notice that after you have (right) click a link the the URL changes to www.google.com/url?xxxxx.
    You can use this bookmarklet to remove the onmousedown attributes.
    <pre><nowiki>javascript:(function(){var e=document.querySelectorAll('*[id="search"] a[onmousedown]'),E,i;for(i=0;E=e[i];i++){E.removeAttribute('onmousedown')}})()</nowiki></pre>

Maybe you are looking for