ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Global event handler?? (https://www.excelbanter.com/excel-programming/314497-global-event-handler.html)

[email protected]

Global event handler??
 
Hi all news group readers,
I have the following problem:
In a user form, within a Multipage I have 567 TextBoxes.
I need to handle keypress events for all of them in a global manner
since I don't want to clutter my code with 567 subs.
Can anyone tell me if this is possible?
Thanks


Tom Ogilvy

Global event handler??
 
John Walkenbach demonstrates the technique with commandbuttons, but you can
adapt it to textboxes for the keypress events

http://j-walk.com/ss/excel/tips/tip44.htm
Handle Multiple UserForm Buttons With One Subroutine

this approach won't work for events provided by the Control Object such as
Exit and BeforeUpdate as examples.

--
Regards,
Tom Ogilvy



wrote in message
...
Hi all news group readers,
I have the following problem:
In a user form, within a Multipage I have 567 TextBoxes.
I need to handle keypress events for all of them in a global manner
since I don't want to clutter my code with 567 subs.
Can anyone tell me if this is possible?
Thanks





All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com