Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Macro help for checking and unchecking cells

Posted on 2016-11-03
4
31 Views
Last Modified: 2016-11-03
EE Pros,

I have a graphic that allows someone to select a specific condition for displaying a row or column of data.  

Doubleclick and the check appears; Doubleclick again and it SHOULD disappear.  There are 7 vertical check boxes (cells) and 4 horizontal check boxes (Cells).  What currently works is if you delete the existing check boxes (vertical), and doubleclick, you will see the checkmarks appear.  Doubleclick, they do not disappear (not working).  And none of the horizontal check boxes/cells work yet.

Talk a look (instruction is in yellow).

Thank you in advance!

B.
RadarChartMultiVariable.xlsm
0
Comment
Question by:Bright01
  • 3
4 Comments
 
LVL 46

Expert Comment

by:Martin Liss
ID: 41873061
Change the top part as shown.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Provides check button

If Target.Column = 4 Then
'If Target = Chkboxvertical Then

Open in new window

0
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 41873077
This gets the horizontal ones too

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim rng As Range
Set rng = Union(Range("D6:D12"), Range("F4:I4"))
If Not Intersect(Target, rng) Is Nothing Then
    Application.ScreenUpdating = True
    With ActiveCell

Open in new window

0
 

Author Closing Comment

by:Bright01
ID: 41873182
Works!!!!  Great.  Appreciate the fix.  And I must say, I'm doing much better in reading your responses..... which may mean, I've actually begun to learn something!

Thanks again.

B.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 41873185
Your welcome and if there's anything in one of my answers that you don't understand then please ask.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question