+ Reply to Thread
Results 1 to 2 of 2

How do I make a check box highlight cells if true?

  1. #1
    BrianXJ
    Guest

    How do I make a check box highlight cells if true?

    I'm trying to add a check box so that when checked, it will highlight certain
    cells. I've been trying to write a Macros for it and can't figure it out...
    any help?

  2. #2
    Tom Ogilvy
    Guest

    Re: How do I make a check box highlight cells if true?

    If using a checkbox from the Control Toolbox Toolbar, then place it on the
    sheet and double click on it. This should take you to the click event

    Private Sub Checkbox1_Click()

    end Sub

    put code in here
    Private Sub Checkbox1_Click()
    if Checkbox1.Value = True then
    Range("A5:F20").Interior.ColorIndex = 3
    else
    Range("A5:F20").Interior.ColorIndex = xlNone
    End if
    end Sub

    return to excel and in the control toolbox toolbar, click the top right
    control so it does not appear depressed. This takes you out of design mode
    and allow the events to fire when you click the control.

    Adjust to suit.

    --
    Regards,
    Tom Ogilvy


    "BrianXJ" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to add a check box so that when checked, it will highlight

    certain
    > cells. I've been trying to write a Macros for it and can't figure it

    out...
    > any help?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1