Have ActiveX CheckBox become checked based on cell value greater than X. Using VBA



I am trying to have "CheckBox" value become True when the Cell A1 value is greater or equalt to 100.

This is the code I have tried to no sucess:

Private Sub CheckBox_Change()
    If Range("E10").Value >= 100 Then
        Me.CheckBox.Value = True
        Me.CheckBox.Value = False
    End If
End Sub

I would appriciate any advice on the subject, thanks!



Please put CODE tags around your code. To do that, edit your post, select your code and click the CODE button.
don (rep: 1521) Jul 27, '16 at 10:39 pm
Add to Discussion


Selected Answer

You don't actually need VBA for this.

Go to another cell in your worksheet that is empty and enter this formula:


Then go to the check box and right-click it > click Format Control > go to the Control tab > click inside the Cell link input area and then select the cell where you just placed the formula.

You can also hide the new formula so it doesn't disrupt your spreadsheet; just select the cell with the formula and change the text color to the same as the background color of the cell, usually white.



This is a much easier way to do this, seems to work fine. Thank you!
aorlowski (rep: 4) Jul 28, '16 at 10:38 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login