Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default How do you hide a bar chart in Excel

I have a bar chart that I would like to hide so I can possibly assign it to a
macro and have it unhide and hide at the push of a button. Does anybody know
if this is possible or any other ways to do it? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,344
Default How do you hide a bar chart in Excel

Hi,

take a look at the command Tools, Options, View tab, Show Placeholders or
Hide All. You can record a macro to toggle this on and off.

Sub ToggleCharts()
If ActiveWorkbook.DisplayDrawingObjects = xlHide Then
ActiveWorkbook.DisplayDrawingObjects = xlDisplayShapes
Else
ActiveWorkbook.DisplayDrawingObjects = xlHide
End If
End Sub

--
Thanks,
Shane Devenshire


"bhowell" wrote:

I have a bar chart that I would like to hide so I can possibly assign it to a
macro and have it unhide and hide at the push of a button. Does anybody know
if this is possible or any other ways to do it? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default How do you hide a bar chart in Excel

If it's a chart sheet, you can use

Charts("sheet name").Visible = True/False

If it's an embedded chart, you can use

ActiveSheet.ChartObjects(x).Visible = True/False

where x is either the number of the chart object or the name of the chart.
To learn about chart names, see:
http://peltiertech.com/Excel/ChartsH...ameAChart.html

The simplest macro would be:

Sub ToggleChartVisibility()
Charts("sheet name").Visible = Not Charts("sheet name").Visible
End Sub

To learn about assigning macros to buttons:
http://peltiertech.com/WordPress/200...tton-or-shape/

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"bhowell" wrote in message
...
I have a bar chart that I would like to hide so I can possibly assign it to
a
macro and have it unhide and hide at the push of a button. Does anybody
know
if this is possible or any other ways to do it? Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default How do you hide a bar chart in Excel

That doesn't do one chart, it does all of the charts and shapes on the
sheet. It might do what the OP wanted, but not what I interpreted that he
wanted.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"ShaneDevenshire" wrote in
message ...
Hi,

take a look at the command Tools, Options, View tab, Show Placeholders or
Hide All. You can record a macro to toggle this on and off.

Sub ToggleCharts()
If ActiveWorkbook.DisplayDrawingObjects = xlHide Then
ActiveWorkbook.DisplayDrawingObjects = xlDisplayShapes
Else
ActiveWorkbook.DisplayDrawingObjects = xlHide
End If
End Sub

--
Thanks,
Shane Devenshire


"bhowell" wrote:

I have a bar chart that I would like to hide so I can possibly assign it
to a
macro and have it unhide and hide at the push of a button. Does anybody
know
if this is possible or any other ways to do it? Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide #N/A in chart Hassan Charts and Charting in Excel 1 May 12th 08 07:51 PM
how to hide #N/A in chart Hassan Charts and Charting in Excel 1 May 12th 08 07:11 PM
Hide Cells with Zero Value in Excel 2007 while using line chart ty Chicago Charts and Charting in Excel 1 January 23rd 08 08:52 PM
Hide a chart E Gray R&A Charts and Charting in Excel 2 January 8th 08 02:24 AM
Excel - if cells = 0, how to conditionally hide rows in chart fineimage Excel Worksheet Functions 1 November 11th 04 09:45 PM


All times are GMT +1. The time now is 03:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"