VBA/Excel/Access/Word/Forms/CheckBox

Материал из VB Эксперт
Перейти к: навигация, поиск

CheckBox returns a True value when checked, or a False value if not.

 
     Private Sub CheckBox1_Click()
         If CheckBox1.Value Then
             Range("B1").Value = 0.33
         Else
             Range("B1").Value = 0.3
         End If
     End Sub



Check various properties of the controls and take appropriate actions

 
Sub check()
  If CheckBox1.Value = True Then Call yourModule
End Sub



Makes CheckBox control appear with a check mark:

 
Sub value()
  UserForm1.CheckBox1.Value = True
End Sub