Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm events
I have a form and a class that uses the form. I want to trap events for
a ListBox within the class. I have a MSForms.ListBox variable in the class, which I set to be the listbox in the form. However, there are fewer events that I can trap in the class than I could in the form (there are fewer entries in the combobox containing the list of possible events). Why? Is there anyway to change this? In particular, the AfterUpdate, Enter, Exit and maybe some other events are missing. The same thing happens with other controls, as well. Any help would be appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm events
those events belong to the control object - the container on the form that
holds the listbox. To the best of my knowledge, you can't manage those events from a class. -- Regards, Tom Ogilvy "R Avery" wrote in message ... I have a form and a class that uses the form. I want to trap events for a ListBox within the class. I have a MSForms.ListBox variable in the class, which I set to be the listbox in the form. However, there are fewer events that I can trap in the class than I could in the form (there are fewer entries in the combobox containing the list of possible events). Why? Is there anyway to change this? In particular, the AfterUpdate, Enter, Exit and maybe some other events are missing. The same thing happens with other controls, as well. Any help would be appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm events
Hi
As far as I know, no. It's an annoying limitation. A workaround might be to call a class' public sub from the control's own event, lik, in the userform Private Sub ListBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Call MyObject.EvaluateMe End Sub HTH. Best wishes Harald "R Avery" skrev i melding ... I have a form and a class that uses the form. I want to trap events for a ListBox within the class. I have a MSForms.ListBox variable in the class, which I set to be the listbox in the form. However, there are fewer events that I can trap in the class than I could in the form (there are fewer entries in the combobox containing the list of possible events). Why? Is there anyway to change this? In particular, the AfterUpdate, Enter, Exit and maybe some other events are missing. The same thing happens with other controls, as well. Any help would be appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm events
Actually, not only cannot I trap those events, but when I set the
class's ListBox (or any other control that I have tested), it does not seem to have all of the proper methods according to intellisense. For example, it is missing the Top and Left properties. However, I can set these despite not being in Intellisense. Why? Is there anyway to fix this? Tom Ogilvy wrote: those events belong to the control object - the container on the form that holds the listbox. To the best of my knowledge, you can't manage those events from a class. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm events
Again, if you look at the object browser, you will probably see those are
properties of the control object and not of the listbox itself - such as rowsource as an example. When the listbox is on the worksheet, the property is ListFillRange and is provided by the OLEObject. If you can set them, then I don't see anything to fix. For the events, I am not aware of a fix. -- Regards, Tom Ogilvy "R Avery" wrote in message ... Actually, not only cannot I trap those events, but when I set the class's ListBox (or any other control that I have tested), it does not seem to have all of the proper methods according to intellisense. For example, it is missing the Top and Left properties. However, I can set these despite not being in Intellisense. Why? Is there anyway to fix this? Tom Ogilvy wrote: those events belong to the control object - the container on the form that holds the listbox. To the best of my knowledge, you can't manage those events from a class. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm events
Ok. I understand. Thanks a lot. I love this newsgroup.
Tom Ogilvy wrote: Again, if you look at the object browser, you will probably see those are properties of the control object and not of the listbox itself - such as rowsource as an example. When the listbox is on the worksheet, the property is ListFillRange and is provided by the OLEObject. If you can set them, then I don't see anything to fix. For the events, I am not aware of a fix. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
events? | Excel Discussion (Misc queries) | |||
unload userform from within one of that form's beforeupdate events? | Excel Programming | |||
IeTimer events not working in modeless Userform? | Excel Programming | |||
UserForm Events | Excel Programming | |||
events | Excel Programming |