Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default On Enter and On Exit events of MSFORMS controls?

Hi,

I'm designing a userform with adding some controls on runtime. For global control events, I added some class modules, like Textboxes change, keydown event etc. The problem is when I declare textbox in class module with

Public WithEvents TextBox As MSForms.TextBox

there is no On Enter or On Exit events available. It is also same for all other controls. When I checked out from Object Browser, I figured out that just MSFORMS.CONTROL has ON ENTER and ON EXIT events. and I tried to add a class module for MSFORMS.CONTROL object, I can get the ON ENTER and ON EXIT events in the class module, but on runtime it gives me error.

Any suggestions?

Thanks in advance.



--
Regards

Haldun Alay

To e-mail me, please remove AT and DOT from my e-mail address.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default On Enter and On Exit events of MSFORMS controls?

As far as I know, you can not trap these events using a class module. The
are "inherited" by the msforms controls and don't seem to be trappable in
that fashion.

--
Regards,
Tom Ogilvy

"Haldun Alay" <haldunalayATyahooDOTcom wrote in message
...
Hi,

I'm designing a userform with adding some controls on runtime. For global
control events, I added some class modules, like Textboxes change, keydown
event etc. The problem is when I declare textbox in class module with

Public WithEvents TextBox As MSForms.TextBox

there is no On Enter or On Exit events available. It is also same for all
other controls. When I checked out from Object Browser, I figured out that
just MSFORMS.CONTROL has ON ENTER and ON EXIT events. and I tried to add a
class module for MSFORMS.CONTROL object, I can get the ON ENTER and ON EXIT
events in the class module, but on runtime it gives me error.

Any suggestions?

Thanks in advance.



--
Regards

Haldun Alay

To e-mail me, please remove AT and DOT from my e-mail address.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning events to runtime-created controls - is it possible? BizMark Excel Discussion (Misc queries) 1 November 20th 06 09:36 AM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
Can't move from one cell and/or enter any data, or exit wksht... Stuck in One cell Excel Discussion (Misc queries) 2 March 28th 05 06:19 AM
Setting form controls focus and enter key John T Ingato Excel Programming 1 October 6th 03 05:13 PM
MSForms cancel Tritan Excel Programming 1 July 17th 03 08:50 PM


All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"