?
Solved

Macro help for checking and unchecking cells

Posted on 2016-11-03
4
Medium Priority
?
34 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
[X]
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
  • 3
4 Comments
 
LVL 49

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 49

Accepted Solution

by:
Martin Liss earned 2000 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 49

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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

801 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