ar
      Dim lIndex As Long
      For iBtn = 1 To ButtonCount
         Set cBtn = ButtonItem(iBtn)
         Set cMatch = cBtn.AcceleratorMatches(lhWnd, vKey, shiftState, False,
          ctl)
         If Not (cMatch Is Nothing) Then
            ' We have one, send a click event
            If Not (ctl Is Nothing) Then
               lIndex = ctl.ButtonIndex(cMatch)
               If (lIndex &gt; 0) Then
                  ctl.fClickButton lIndex
               Else
                  ctl.fRaiseHiddenMenuClick