Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MSForms.TextBox Exit event isn't available in Excel class mosule

I'm trying to setup MyTextBoxes class to handle data
validation of userform textboxes. My class module is as
follows:

Option Explicit

Public WithEvents MyTextBox As MSForms.TextBox
Private CurrValidation As Integer

Property Get Validation() As Integer
Set Validation = CurrValidation
End Property

Property Let Validation(ValType As Integer)
CurrValidation = ValType
End Property

Private Sub MyTextBox_Change()
MsgBox ("Change")
End Sub

Obviously I want to use MyTextBox_Exit event, but it is
not listed in the event list in the class module (all the
events are available except for AfterUpdate, Exit and
Enter). Is there any workaround of this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MSForms.TextBox Exit event isn't available in Excel class mosule

Hi lacos,

Yes in class module, there is NO TextBox_Exit event(I looked into it).
I had same questions before...

So all we can do is substitute KeyDown event for Exit event.

And if you are using XL2000 and the later version, I think you can make
an event with RaiseEvent.

It's not exactly you want, but if you have time please have a look at
this thread.

http://www.mrexcel.com/board2/viewto...=asc&sta rt=0



lacos wrote:
*I'm trying to setup MyTextBoxes class to handle data
validation of userform textboxes. My class module is as
follows:

Option Explicit

Public WithEvents MyTextBox As MSForms.TextBox
Private CurrValidation As Integer

Property Get Validation() As Integer
Set Validation = CurrValidation
End Property

Property Let Validation(ValType As Integer)
CurrValidation = ValType
End Property

Private Sub MyTextBox_Change()
MsgBox ("Change")
End Sub

Obviously I want to use MyTextBox_Exit event, but it is
not listed in the event list in the class module (all the
events are available except for AfterUpdate, Exit and
Enter). Is there any workaround of this? *



---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default MSForms.TextBox Exit event isn't available in Excel class mosule

Thanks Colo!!! I've got it now!

-----Original Message-----
Hi lacos,

Yes in class module, there is NO TextBox_Exit event(I

looked into it).
I had same questions before...

So all we can do is substitute KeyDown event for Exit

event.

And if you are using XL2000 and the later version, I

think you can make
an event with RaiseEvent.

It's not exactly you want, but if you have time please

have a look at
this thread.

http://www.mrexcel.com/board2/viewtopic.php?

t=69331&postdays=0&postorder=asc&start=0



lacos wrote:
*I'm trying to setup MyTextBoxes class to handle data
validation of userform textboxes. My class module is as
follows:

Option Explicit

Public WithEvents MyTextBox As MSForms.TextBox
Private CurrValidation As Integer

Property Get Validation() As Integer
Set Validation = CurrValidation
End Property

Property Let Validation(ValType As Integer)
CurrValidation = ValType
End Property

Private Sub MyTextBox_Change()
MsgBox ("Change")
End Sub

Obviously I want to use MyTextBox_Exit event, but it is
not listed in the event list in the class module (all

the
events are available except for AfterUpdate, Exit and
Enter). Is there any workaround of this? *



---
Message posted from http://www.ExcelForum.com/

.

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
Private Textbox Exit Sub question... [email protected] Excel Worksheet Functions 14 March 1st 07 03:58 AM
How can I expose the TextBox BeforeUpdate event to my user class? bereid Excel Discussion (Misc queries) 0 November 30th 05 05:00 PM
Capture event when exit Column G zSplash Excel Discussion (Misc queries) 2 December 27th 04 05:28 PM
Control Exit event Fred Excel Programming 0 November 19th 03 12:59 AM
On Enter and On Exit events of MSFORMS controls? Haldun Alay[_3_] Excel Programming 1 November 4th 03 01:06 PM


All times are GMT +1. The time now is 04:30 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"