Private Sub CheckBox9_Click()
If CheckBox9.Value = True Then
CheckBox9.Caption = "Done"
ActiveWorkbook.Sheets("Well Planning Checklist").Tab.ColorIndex = 4
'ActiveSheet.Tab.ColorIndex = 22
Range("Q17").Value = CheckBox9.Caption
Else
If LCase(Range("Q17").Value) = CheckBox9.Caption Then
CheckBox9.Value = Not (CheckBox9.Value)
Else
CheckBox9.Value = Not (CheckBox9.Value)
End If
End If
End Sub
我用上面的方法来确保一旦用户点击复选框,他就不能取消选中它。但是,我希望能够拥有一个我的用户可以重置的 Button 。一切,而不仅仅是复选框。我有以下但它不工作。有人可以帮我让它工作吗?
Private Sub CommandButton1_Click()
CheckBox9
ActiveWorkbook.Sheets("Well Design Section").CheckBox9.Caption = "Incomplete "
ActiveWorkbook.Sheets("Well Design Section").CheckBox9.Value = False
Range("Q17").Value = "Incomplete"
End Sub