VBA Interacting With Radio Buttons On Webpage

bartek-sl

New Member
I've been searching forums for a couple of hours now trying to find a solution to this problem, but none of the things I've tried work. I'm using VBA to automate the process of creating a survey on SurveyMonkey. So far I've been able to:
  • Log into my account,
  • Click several hyperlinks to create a new response collector,
  • Name the collector,
  • Go to the collector settings,
  • And, select three of four radio buttons to change collector settings.
The issue isn't that I can't select the radio buttons; my code selects the first three buttons just fine. What puzzles me is that the fourth button doesn't change! I use the same process for each button, so I can't figure out why the last button won't select. Here's the section of my code: \[code\]objIE.Document.getElementById("rdlResponseType_1").Click 'Allow multiple responses = YesobjIE.Document.getElementById("rdlResponseEdit_1").Click 'Allow Responses to be Edited = YesobjIE.Document.getElementById("rdlThankyou_1").Click 'Display a "Thank You" page? = YesobjIE.Document.getElementById("rdlCompleteOpt_1").Click 'Survey Completion = Close Window\[/code\]This is the HTML for the radio buttons:\[code\]<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;"> <tr id="CompleteOptDesc"> <td style="">&nbsp;</td> <td>After the respondent leaves the survey:</td> </tr> <tr id="CompleteOptItems"> <td style="">&nbsp;</td> <td align="left" nowrap="nowrap" valign="top"> <table id="rdlCompleteOpt" class="Clean radioList" OnClick="radioToggle('rdlCompleteOpt', '0', 'panLink');" name="rdlCompleteOpt" border="0" style="white-space: nowrap"> <tr> <td><span style="white-space: nowrap"><input id="rdlCompleteOpt_0" type="radio" name="rdlCompleteOpt" value="http://stackoverflow.com/questions/15579830/0" checked="checked" /><label for="rdlCompleteOpt_0"><b>Redirect</b> to your own webpage.</label></span></td> </tr><tr> <td><input id="rdlCompleteOpt_1" type="radio" name="rdlCompleteOpt" value="http://stackoverflow.com/questions/15579830/2" /><label for="rdlCompleteOpt_1"><b>Close Window</b></label></td> </tr> </table>\[/code\]Any suggestions would be very appreciated!
 
Back
Top