ボタンの色  次の文書

Dim Pos As Boolean
Private Sub CommandButton1_Click()
If Pos = True Then
CommandButton1.Caption = "開始"
Pos = False
Else
CommandButton1.Caption = "終了"
Pos = True
End If
End Sub

Private Sub CommandButton2_Click()
'CommandButton2.BackColor = &H80FF&
'CommandButton2.BackColor = QBColor(14)
CommandButton2.BackColor = RGB(255, 30, 145)
End Sub

Private Sub CommandButton3_Click()
CommandButton2.Enabled = False '無効
End Sub

Private Sub CommandButton4_Click()
CommandButton2.Enabled = True '有効
End Sub

Private Sub CommandButton5_Click()
Dim Fname As String

Fname = ActiveWorkbook.Path & "\Paint_4.ico"
CommandButton2.Picture = LoadPicture(Fname)
End Sub

Private Sub Worksheet_Activate()
Pos = False
CommandButton1.Caption = "開始"
End Sub

 



← 左の文字をここへ入力後 登録ボタンをクリックしてください

(サイト管理者承認後掲載されます)