Is there something similar to OnChange in VB?

odin1701

Registered User.
Local time
Today, 12:29
Joined
Dec 6, 2006
Messages
526
Used to working with VBA in Access.

I am used to having the ability to trigger code happening if anything in an option group changes.

Say I have radio buttons or check boxes within an option group. I could use the OnChange event of the Option group which would trigger code whenever any radio button or check would be changed.

I'm wanting to do the same sort of thing in VB 2010. Is there an equivalent way to do this? Otherwise there would have to be a sub for every radio button on the form.
 
Check out the GroupBox control in the containers section of your toolbox. If you add RadioButtons to that container only one of them can be set to true.
Cheers,
 
you can also assign the click event for all similar radio buttons / checkboxes to the same event handler, you pass it (object, eventargs) so you can get what is being called from the object argument and then go from there.
 

Users who are viewing this thread

Back
Top Bottom