This project is read-only.

ControlType Property

Returns the type of Composite Control. Read-only ccControlType



object A reference to a cControl or cControl_EventHandler class instance.


ControlType is an eumeration which is used to differ between the varying types of controls and control event handlers which may be instanced in the Composite Controls object model. The event handler enumerations for ActiveX controls have integral values identical to Microsoft Access acControlType enumerations (e.g., uctComboBox_EventHandler = acComboBox).


This example evaluates a Composite Controls object's ControlType property and displays a message box indicating the type of control based on the property value.

Select Case myControlEventHandler.ControlType

Case ccCombox_EventHandler

     MsgBox "ComboBox event handler"

Case acTextBox 'this is valid as acTextBox = ccTextBox_EventHandler

     MsgBox "TextBox event handler"

Case Else

     MsgBox "Unidentified event handler"

End Select

Last edited Dec 23, 2010 at 12:35 PM by vba_junkie, version 3


No comments yet.