MSForms.TextBox Exit event isn't available in Excel class mosule

L

lacos

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?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top