Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Creating an Event handler
Hello everyone, I'm not sure if this is possible in VBA but here goes.
I am trying to create an event handler in vba - MS Word - to handle all of the click events for a series of check box's that I have in a table.
The reason that I want to set up a single event handler is there is a large number of check box's so instead of having:
Private Sub CheckBox1_Click()
Private sub Checkbox2_Click()
I could have something like
Private sub ActiveDocument.shapes_Click( obj at ActiveDocument.Shapes.OLEFormat)
if obj.progID = "Forms.CheckBox.1" then
...code for event here
has anyone ever done anything like this before? any thoughts.
Run Dos Run
0 · ·