bute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Implements IOwnerDrawButton
Private m_cODBtn As cOwnerDrawButton
Private Declare Function GetDlgCtrlID Lib "user32" (ByVal hwnd As Long) As Long


Private Sub chkTest_Click(Index As Integer)
Dim sMsg As String
Dim i As Long
   For i = 0 To 2
      If (chkTest(i).Value = Checked) Then
         sMsg = sMsg &amp; i &amp; ","
      End If
   Next
   If (sMsg &lt;&gt; "") Then
      sMsg = left$(sMsg, Len(sMsg) - 1) &amp; " selected"
   E