Check box linked cell = TRUE then J5 valued reduced by 1
Here is another shot at it that errors on the Set cb = line...
Renamed "Stuff" and shows "Stuff Checkbox" (no " "'s) in the Properties drop down at the very top of the Properties Window and in the Name box at the top of the properties list it shows as "Stuff" (no " "'s). (I set Caption to "Stuff It" (no " "'s) to let you know I am not confusing Caption with Name.)
Both of these error out.
Set cb = ActiveSheet.Shapes("Stuff CheckBox")
Set cb = ActiveSheet.Shapes("Stuff")
Private Sub Stuff_Click()
Dim cb As Shape
Set cb = ActiveSheet.Shapes("Stuff CheckBox")
'Set cb = ActiveSheet.Shapes("Stuff")
If cb.OLEFormat.Object.Value = 1 Then
MsgBox "Checkbox is Checked"
Else
MsgBox "Checkbox is not Checked"
End If
End Sub
Could you please show on a linked workbook what a correct/workable example using this code and the name "My Stuff" for the activex checkbox?
Howard
|