View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default 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