Hi all

On many forms, I dynamicaly create hundreds of textbox. I'd like this textboxes react on events such as press a special key. Every actions perform by each textbox are very similar and very simple: they display a MsgBox with a message given to the textbox on creation time (but messages are different for textbox).

I know how to detect the key press for a static control.

I don't know the good practices in VBA to write the _KeyPress function only once for every controls. Is it possible to create my own control?

Thanks for your help
Florent