How to handle on click event using VBA code.

Devendra

Banned
Joined
Oct 21, 2010
Messages
56
Here is the HTML code.

< input type ='button' id = 'ToggleButton' name= 'ToggleButton' value = 'Expand All' style = 'width:100px' on click = 'ToggleAllVisStatus (this) '

Can someone help me how to handle on click event after clicking on toggle button.</TD>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You might not need to, changing the value of the button's click event.

It's hard to tell though without more information.
 
Upvote 0
The issue I'm facing is that after clicking on "Expand All" button all the checkboxes available on page showing disabled because I dont know hw to handle "on click = 'ToggleAllVisStatus (this) " event.

To click button I have used below code.

doc1.all("ToggleButton").Click
 
Upvote 0
That code should trigger the click event, if it doesn't then I can't really tell why without more information.

A couple of lines of code isn't much to go on.
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top