Solved

Macro help for checking and unchecking cells

Posted on 2016-11-03
4
28 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now