1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel - cell control of checkboxes

Discussion in 'Business Applications' started by wingit, May 12, 2010.

Thread Status:
Not open for further replies.
  1. wingit

    wingit Thread Starter

    Joined:
    May 12, 2010
    Messages:
    3
    I have an excel sheet that i would like to add a checkbox to.
    The checkbox should be cleared every time a condition in cell A1 is met (i.e. FALSE) so that the user is then forced to check it again.
    There will be multiple sheets to the workbook with this scenario.

    Please help, I cannot figure out the vba code required to control the checkbox in this way. I do not mind whether i use a form field or the control toolbox.
     
  2. wingit

    wingit Thread Starter

    Joined:
    May 12, 2010
    Messages:
    3
    Ok,
    I have figured out this much now. It works but only if I manually enter the value "TRUE" into cell S6.
    If this cell is returning a "TRUE" value by performin an IF function it wont work.
    I would very much appreciate any assistance in solving this problem.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address(False, False) = "S6" Then
    Application.EnableEvents = False
    If Target.Value = "TRUE" Then
    ActiveSheet.CheckBoxes("Check Box A") = False
    End If
    Application.EnableEvents = True
    End If
    End Sub
     
  3. wingit

    wingit Thread Starter

    Joined:
    May 12, 2010
    Messages:
    3
    Further update,
    I now have this working for a cell which is gives the result of a formula and i have it working on multiple sheets.
    If anyone can suggest a version of this that would work with the 'Control Toolbox' checkbox that would be great!!

    Private Sub Worksheet_Calculate()
    If [S6] > 0 Then
    ActiveSheet.CheckBoxes("Check Box A") = False
    End If
    End Sub
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/922571

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice