I've got an Excel 2003 application. In VBA I have created a userform and that form uses an OCX control. This OCX communicates back to me with an event handler when certain things occur.
The control is named: ABC
The event is : CacheChange
In approach #1, I placed dropped the OCX on the form. Then in the userform code I selected the control, selected the event and coded up the stuff I needed. So I had a SUB defined as:
private sub ABC_CacheChange(.........)
Great. No problems, the handler executes as expected.
Now in approach #2, rather than drop the OCX on the form, I instantiate it after the form is activated and when the user clicks a button on the form. Same control name:
set ABC = New .........
Everything works just fine, I guess, except that the event handler now will no longer be executed.
Any thoughts on the problem?
The control is named: ABC
The event is : CacheChange
In approach #1, I placed dropped the OCX on the form. Then in the userform code I selected the control, selected the event and coded up the stuff I needed. So I had a SUB defined as:
private sub ABC_CacheChange(.........)
Great. No problems, the handler executes as expected.
Now in approach #2, rather than drop the OCX on the form, I instantiate it after the form is activated and when the user clicks a button on the form. Same control name:
set ABC = New .........
Everything works just fine, I guess, except that the event handler now will no longer be executed.
Any thoughts on the problem?