ControlType Property


Returns the type of Composite Control. Read-only ccControlType

Syntax

object.ControlType

object A reference to a cControl or cControl_EventHandler class instance.

Remarks

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).

Example

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 11:35 AM by vba_junkie, version 3

Comments

No comments yet.