HighAndWilder
Well-known Member
- Joined
- Nov 4, 2006
- Messages
- 712
- Office Version
- 365
- Platform
- Windows
Good morning
I am adding controls at runtime to a userform.
I have done this before and I cannot work out what I am doing differently this time.
I can add the controls alright and I can add the event handler code in the form module programatically. The form loads alright but the event handlers do not work.
No errors are reported.
All I can assume is that the Control does not know that the Event Handler exists.
What I find interesting is that when, for example, a Command Button is set up manually and the Event Handler code is written from scratch rather than clicking on the button then the Event Handler code does not run when the user clicks on the button at runtime.
Has anybody else come across this problem?
Thanks
I am adding controls at runtime to a userform.
I have done this before and I cannot work out what I am doing differently this time.
I can add the controls alright and I can add the event handler code in the form module programatically. The form loads alright but the event handlers do not work.
No errors are reported.
All I can assume is that the Control does not know that the Event Handler exists.
What I find interesting is that when, for example, a Command Button is set up manually and the Event Handler code is written from scratch rather than clicking on the button then the Event Handler code does not run when the user clicks on the button at runtime.
Has anybody else come across this problem?
Thanks