Hi
I have a specific question about getting events to work with run-time created controls of VBA forms version 2.01
I've made a VBA form that has 2 static command buttons (OK and Cancel). The init-sub of the form creates x option buttons at run-time. The content of the option buttons are fecthed from an Excel Range.
What I now do is to scan through the Controls("name of the control") in a loop to figure out which option button is currently active when the user click on the OK-button.
It all works well, but I want to enable *_DblClick() event for all the option buttons so it is possible to make a choice by double-clicking on any of the option button.
If I create event-subs myself identical to what they would get at creating them at design, they will not trigger.
Does anyone know how the fetch double-click event on controls created by code at run-time? If you do, please, let me know.
I have a specific question about getting events to work with run-time created controls of VBA forms version 2.01
I've made a VBA form that has 2 static command buttons (OK and Cancel). The init-sub of the form creates x option buttons at run-time. The content of the option buttons are fecthed from an Excel Range.
What I now do is to scan through the Controls("name of the control") in a loop to figure out which option button is currently active when the user click on the OK-button.
It all works well, but I want to enable *_DblClick() event for all the option buttons so it is possible to make a choice by double-clicking on any of the option button.
If I create event-subs myself identical to what they would get at creating them at design, they will not trigger.
Does anyone know how the fetch double-click event on controls created by code at run-time? If you do, please, let me know.