
Private Sub CommandButton1_Click() cmd_ck CommandButton1, 1 End Sub Private Sub CommandButton2_Click() cmd_ck CommandButton2, 2 End Sub Private Sub CommandButton3_Click() cmd_ck CommandButton3, 3 End Sub Sub cmd_ck(obj As MSForms.CommandButton, i As Integer) Dim obj_cmd As MSForms.CommandButton Set obj_cmd = obj If obj.Caption = "(-.-)v " & i Then obj.Caption = "(-.-)g " & i Else obj.Caption = "(-.-)v " & i End If Set obj_cmd = Nothing End Sub Private Sub UserForm_Initialize() Dim cmd As MSForms.CommandButton Dim ary_cmd As Variant Dim i As Integer ary_cmd = Array(CommandButton1, CommandButton2, CommandButton3) For i = 0 To UBound(ary_cmd) Set cmd = ary_cmd(i) cmd.Caption = "" Set cmd = Nothing Next End Sub