I have a userform with a webbrowser filling 100% of the form. The source html is a local file and acts as a switch with six large 'buttons' on it. When one of the buttons are clicked it opens a userform which corresponds to that button. How can I detect if one of the six buttons are clicked and then open the corresponding userform? I can use getElementsByClassName("a01") to reference each button, but don't know how to detect an actual mouse click on it. Do I detect the click using excel vba, or do I add code to the html which executes a macro once the link is clicked?
example html of one of the buttons:
<div class="col-rt-4">
<img class="image" src="img/ins-00.gif" alt="">
<a class="a01" href="">
<div class="overlay">
<img class="image" src="img/ins-00.jpg" alt="">
<h1 class="no-select">Inspection Form</h1>
</div>
</a>
</div>
example html of one of the buttons:
<div class="col-rt-4">
<img class="image" src="img/ins-00.gif" alt="">
<a class="a01" href="">
<div class="overlay">
<img class="image" src="img/ins-00.jpg" alt="">
<h1 class="no-select">Inspection Form</h1>
</div>
</a>
</div>