Solved

Macro help for checking and unchecking cells

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

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 45

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 45

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
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;…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

708 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

13 Experts available now in Live!

Get 1:1 Help Now