Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time control events
Hi
I have a form with a frame. In that frame, I add TextBox controls during run time. Question: how can I trap the change event of these controls which were added at runtime Thanks in advanc Christof |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time control events
wrap the control in a class which handles the event. add
a new instance of the class for each control and add it to a collection. Patrick Molloy Microsoft Excel MVP -----Original Message----- Hi, I have a form with a frame. In that frame, I add TextBox controls during run time. Question: how can I trap the change event of these controls which were added at runtime? Thanks in advance Christof . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time control events
I've create a class holding two textboxes as
Public WithEvents SystemBox As TextBox Public WithEvents DescriptionBox As TextBox However, I get the message 'object does not source automation events' Where did I go wrong? Christof |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time control events
Christof,
Both the Excel and the MSForms library contain an object name TextBox. The Excel TextBox does not source events, while the MSForms TextBox does. Because the Excel library appears in the References list before the MSForms library, the compiler is using the Excel TextBox when you declare a variable As TextBox. You need to qualify the TextBox with the MSForms library name. E.g., Public WithEvents SystemBox As MSForms.TextBox -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Christof DB" wrote in message ... I've create a class holding two textboxes as Public WithEvents SystemBox As TextBox Public WithEvents DescriptionBox As TextBox However, I get the message 'object does not source automation events' Where did I go wrong? Christof |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time control events
Hi Christof,
I've create a class holding two textboxes as Public WithEvents SystemBox As TextBox Public WithEvents DescriptionBox As TextBox However, I get the message 'object does not source automation events' Where did I go wrong? You need to declare them As MSForms.TextBox, as Excel has its own TextBox object. Regards Stephen Bullen Microsoft MVP - Excel www.BMSLtd.co.uk |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time control events
Oops, forgot about that. Thanks for the info and a nice weekend
Christof |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
# Events over time? | Excel Discussion (Misc queries) | |||
Graph of events in time | Charts and Charting in Excel | |||
Need formula for time between two events | Excel Worksheet Functions | |||
Chart for events per unit of time??? | Charts and Charting in Excel | |||
How can I calculate events that happened at the same time? | Excel Discussion (Misc queries) |