?
Solved

Displaying Graphic On and Off

Posted on 2011-09-04
3
Medium Priority
?
271 Views
Last Modified: 2012-05-12
I have this great little chart/graph that both Teylyn and Brad (Byuntd) helped me create (actually, they did most of the creating while I only assembled and did some learning).  I have the graphic on a single worksheet and have linked it into a front end sheet at a reduced size, (via copying the original chart/graphic and a macro that keeps it dynamically updated between worksheets.  Here's my question.  Is there some simple macro code I can use (button activated) that will toggle off and on the graphic (i.e. display it, hide it) on the target worksheet?  And do I load the code into the worksheet or a module?

Thank you in advance,

B.
0
Comment
Question by:Bright01
  • 2
3 Comments
 
LVL 81

Expert Comment

by:byundt
ID: 36481234
You can toggle the visibility of the chart using the following macro in a regular module sheet:

Sub ToggleChartVisibility()
With Worksheets("Target").ChartObjects(1)
    .Visible = Not .Visible
End With
End Sub

Open in new window


Brad
0
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 36481240
I updated your sample file with command buttons (Forms toolbar) to run the two macros.

Brad
Adjusting-Graphic-v1--1-Source-t.xlsm
0
 

Author Closing Comment

by:Bright01
ID: 36481333
Brad,

Great work!  Killer App. (as far as you can take an Excel Workbook that is!).

Appreciate the tips, pointers, updates and hard work.

B.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
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 how to use longer labels with horizontal bar charts instead of the vertical column chart.

862 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