2024年5月9日木曜日

QQQ

 Private Sub CmdButtonStart_Click()
'コントロールの有効・無効
MsgBox "CmdButtonStart " & Application.Caption
If Application.Caption = "起動中" Then
    CmdButtonStart.Enabled = False
Else
    CmdButtonStop.Enabled = True
End If
If Application.Caption = "停止中" Then
    CmdButtonStart.Enabled = True
Else
    CmdButtonStop.Enabled = False
End If

End Sub
Private Sub CmdButtonStop_Click()
'コントロールの有効・無効
MsgBox "CmdButtonStop" & Application.Caption
If Application.Caption = "起動中" Then
    CmdButtonStart.Enabled = True
Else
    CmdButtonStop.Enabled = False
End If
If Application.Caption = "停止中" Then
    CmdButtonStart.Enabled = False
Else
    CmdButtonStop.Enabled = True
End If

End Sub