Hey vabz i tried and put the id in the tag here it is 3  its is working but 
when i  stopped the code and let the radio button to be visible first. 

Let me clear it 
on page there is one radio button when i click it open two radio button 
when i select second one it opens many radio buttons with id , what my code 
is not doing is it not opening the radio button i think a refresh is 
required but refresh clear the data. 


i want to know one thing rest of radio button open only when i clicked the 
first it was just a page refers

Set hEle = IE.document.getElementsByName("selectedCode")
        For Each btn In hEle
        If btn.ID = 3 Then
        btn.Click
        btn.Checked = True
        Exit For
    End If
 Next

On Friday, February 13, 2015 at 5:17:33 PM UTC+5:30, Vabz wrote:
>
> i copied 4 of your lines & created HTML file & its working correctly..
>
> On Fri, Feb 13, 2015 at 5:11 PM, Mandeep Baluja <rocke...@gmail.com 
> <javascript:>> wrote:
>
>> Tried this code earlier not working ,may be python will be used to 
>> achieve this. 
>>
>>
>> <input class="selectedCode radio_type" name="selectedCode" 
>> value="OC_GATI_CHENNAI_" type="radio" id="1">
>>
>>
>>
>>
>> On Friday, February 13, 2015 at 4:58:02 PM UTC+5:30, Vabz wrote:
>>>
>>> try this:
>>>
>>> Dim btn As Object
>>> Dim hEle As Object
>>> Set hEle = IE.document.getElementsByName("selectedCode")
>>> For Each btn In hEle
>>>     If btn.Value = "OC_GATI_CHENNAI_" Then
>>>         btn.Click
>>>         Exit For
>>>     End If
>>>  Next
>>>
>>>
>>> Cheers!!
>>>
>>> On Fri, Feb 13, 2015 at 2:45 PM, Mandeep Baluja <rocke...@gmail.com> 
>>> wrote:
>>>
>>>> hey vabz, as i clicked this radio button on webpage with vba 
>>>> ieRadio.Item("ffModels")(0).Checked = True
>>>>
>>>>   it shows list of vendors with there tags on the same page like this 
>>>> below syntax upto 1 to 10 and i want to press that particular radio button 
>>>> with value  for example ocgatichennai i want to select. and then submit 
>>>> the 
>>>> page.
>>>>
>>>> <input class="selectedCode radio_type" name="selectedCode" 
>>>> value="OC_GATI_CHENNAI_" type="radio" id="1">
>>>> <input class="selectedCode radio_type" name="selectedCode" 
>>>> value="OC-DEL-SHAHDARA" type="radio" id="4">
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Friday, February 13, 2015 at 2:12:01 PM UTC+5:30, Vabz wrote:
>>>>>
>>>>> This works withe me..
>>>>>
>>>>> IE.document.getElementsByName("selectedCode").Item(0).Checked = True
>>>>>
>>>>> Cheers!!
>>>>>
>>>>> On Fri, Feb 13, 2015 at 1:50 PM, Vaibhav Joshi <v...@vabs.in> wrote:
>>>>>
>>>>>> can you share webpage url where you are performing this?
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 13, 2015 at 1:06 AM, Mandeep Baluja <rocke...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> <input type="radio" name="radio_fulfillment" id="radio_fulfillment" 
>>>>>>> class="radio_type">
>>>>>>>
>>>>>>> Achieved code : - ieRadio.Item("radio_fulfillment")(0).Checked = 
>>>>>>> True
>>>>>>>
>>>>>>> ieRadio.Item("ffModels")(0).Checked = True
>>>>>>>
>>>>>>> Achieved code  <input type="radio" name="ffModels" 
>>>>>>> id="radio_oneshipvendor" value="osvendor" class="radio_type">
>>>>>>>
>>>>>>> Now the question is check the third tag given below.
>>>>>>>
>>>>>>> Why I am unable to click this third radio button actually when 
>>>>>>> second radio button click it opens third one but with different ids 
>>>>>>> from 1 
>>>>>>> to 10 . how can I click this button with id , or by name from excel 
>>>>>>> sheet. 
>>>>>>> Provided in range,If not  possible  atleast derive a click on this 
>>>>>>> button. 
>>>>>>> But how??? beacause name is not working as mention selected code.
>>>>>>>
>>>>>>> *<input class="selectedCode radio_type" name="selectedCode" 
>>>>>>> value="OC_GATI_BANGALOR" type="radio" id="2">*
>>>>>>>
>>>>>>>
>>>>>>> *Regards, *
>>>>>>>
>>>>>>> *Mandeep baluja *
>>>>>>>
>>>>>>> -- 
>>>>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
>>>>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>>>>>>> https://www.facebook.com/discussexcel
>>>>>>>  
>>>>>>> FORUM RULES
>>>>>>>  
>>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like 
>>>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need 
>>>>>>> Advice will not get quick attention or may not be answered.
>>>>>>> 2) Don't post a question in the thread of another member.
>>>>>>> 3) Don't post questions regarding breaking or bypassing any security 
>>>>>>> measure.
>>>>>>> 4) Acknowledge the responses you receive, good or bad.
>>>>>>> 5) Jobs posting is not allowed.
>>>>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>>>>  
>>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners 
>>>>>>> and members are not responsible for any loss.
>>>>>>> --- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to excel-macros...@googlegroups.com.
>>>>>>> To post to this group, send email to excel-...@googlegroups.com.
>>>>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>  -- 
>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? 
>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>>>> https://www.facebook.com/discussexcel
>>>>  
>>>> FORUM RULES
>>>>  
>>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>>>> will not get quick attention or may not be answered.
>>>> 2) Don't post a question in the thread of another member.
>>>> 3) Don't post questions regarding breaking or bypassing any security 
>>>> measure.
>>>> 4) Acknowledge the responses you receive, good or bad.
>>>> 5) Jobs posting is not allowed.
>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>  
>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners 
>>>> and members are not responsible for any loss.
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to excel-macros...@googlegroups.com.
>>>> To post to this group, send email to excel-...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  -- 
>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
>> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
>> https://www.facebook.com/discussexcel
>>  
>> FORUM RULES
>>  
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>> will not get quick attention or may not be answered.
>> 2) Don't post a question in the thread of another member.
>> 3) Don't post questions regarding breaking or bypassing any security 
>> measure.
>> 4) Acknowledge the responses you receive, good or bad.
>> 5) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>  
>> NOTE : Don't ever post confidential data in a workbook. Forum owners and 
>> members are not responsible for any loss.
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "MS EXCEL AND VBA MACROS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to excel-macros...@googlegroups.com <javascript:>.
>> To post to this group, send email to excel-...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/excel-macros.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to