Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default WithEvents of MSForms.Textbox

Hello everyone,

I have a userform that I am using as a wizard dialog. To clean up the code
a bit, I would like to use classes. I am having a problem implementing some
of the textboxes events in my class object. (Excel 2000)

in my class (cVehicles)

private withevents m_objMake as msforms.textbox

public property set Make(vData as msforms.textbox)
set m_objmake = vData
end property

'This is the event I would like to work with
'it is not available to me, anyone know what I need to do to be notified of
it?
'Since the dialog will have many controls on it, I would like to seperate
some of
'the logic out of the userform and into classes.
private sub m_objMake_Exit(ByVal Cancel as MSForms.ReturnBoolean)
debug.print "Leaving Make..."
end sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default WithEvents of MSForms.Textbox

I am afraid that is just the way that it is. Some events are not exposed
using this technique.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"AMDRIT" wrote in message
...
Hello everyone,

I have a userform that I am using as a wizard dialog. To clean up the

code
a bit, I would like to use classes. I am having a problem implementing

some
of the textboxes events in my class object. (Excel 2000)

in my class (cVehicles)

private withevents m_objMake as msforms.textbox

public property set Make(vData as msforms.textbox)
set m_objmake = vData
end property

'This is the event I would like to work with
'it is not available to me, anyone know what I need to do to be notified

of
it?
'Since the dialog will have many controls on it, I would like to seperate
some of
'the logic out of the userform and into classes.
private sub m_objMake_Exit(ByVal Cancel as MSForms.ReturnBoolean)
debug.print "Leaving Make..."
end sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default WithEvents of MSForms.Textbox

If the event is available to you, it is shown in the right dropdown.

Events such as Exit and BeforeUpdate are not native to the Textbox. They
are provided through the Control container object and as far as I know, you
can not use those events in your class module.

--
Regards,
Tom Ogilvy

"AMDRIT" wrote in message
...
Hello everyone,

I have a userform that I am using as a wizard dialog. To clean up the

code
a bit, I would like to use classes. I am having a problem implementing

some
of the textboxes events in my class object. (Excel 2000)

in my class (cVehicles)

private withevents m_objMake as msforms.textbox

public property set Make(vData as msforms.textbox)
set m_objmake = vData
end property

'This is the event I would like to work with
'it is not available to me, anyone know what I need to do to be notified

of
it?
'Since the dialog will have many controls on it, I would like to seperate
some of
'the logic out of the userform and into classes.
private sub m_objMake_Exit(ByVal Cancel as MSForms.ReturnBoolean)
debug.print "Leaving Make..."
end sub




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
WithEvents Ronin Excel Programming 2 August 20th 05 09:59 PM
MSForms.TextBox Exit event isn't available in Excel class mosule lacos Excel Programming 2 December 12th 03 10:12 AM
Using Class, WithEvents and auto-instanciating Tetsuya Oguma[_2_] Excel Programming 0 September 5th 03 03:22 AM
Can't dynamically add withevents OptionButton to worksheet onedaywhen Excel Programming 6 August 27th 03 09:11 AM
MSForms cancel Tritan Excel Programming 1 July 17th 03 08:50 PM


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