• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Displaying Graphic On and Off

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
Bright01
Asked:
Bright01
  • 2
1 Solution
 
byundtCommented:
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
 
byundtCommented:
I updated your sample file with command buttons (Forms toolbar) to run the two macros.

Brad
Adjusting-Graphic-v1--1-Source-t.xlsm
0
 
Bright01Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now