VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ButtonChain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa ButtonChain
Implements Chain
Private chn As Chain
Private hasLink As Boolean
'--------
Private Sub Chain_addChain(c As Chain)
  Set chn = c
  hasLink = True
End Sub
'--------
Private Function Chain_getChain() As Chain
  Set Chain_getChain = chn
End Function
'--------
Private Function Chain_hasChain() As Boolean
  Chain_hasChain = hasLink
End Function
'--------
Private Sub Chain_sendToChain(c As Control)
  If TypeOf c Is CommandButton Then
    MsgBox "Click on any button to activate it"
  Else
    If hasLink Then
      chn.sendToChain c
    End If
  End If
End Sub

Private Sub Class_Initialize()
  hasLink = False
End Sub

