Tick Checkbox IE Automation Excel VBA

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Tick Checkbox IE Automation Excel VBA



I'm trying to export a file from website but for that i have to select the elements i want to export from a checkbox.



The HTML code for the checkbox i want to tick is:




<input id="MainReport_ctl04_ctl09_divDropDown_ctl00" type="checkbox" name="MainReport$ctl04$ctl09$divDropDown$ctl00" onclick="$get('MainReport_ctl04_ctl09').control.OnSelectAllClick(this);" class="">



I've tried:


With IE.document.getElementsByName("MainReport$ctl04$ctl09$divDropDown$ctl00")
.Item.Click
end with



And


With IE.document.getElementsByName("MainReport$ctl04$ctl09$divDropDown$ctl00")
.Item(0).Checked = True
End With



And


Set obj = IE.document.getElementsByName("MainReport$ctl04$ctl09$divDropDown$ctl00")
obj.FireEvent ("onclick")



But nothing seems to work.



Could someone help me please? Thank u in advanced!









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

C# - How to create a semi transparent or blurred backcolor on windows form

Swipe gestures in WKWebView

How to populate data on nav-tab in partial View in MVC?