Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding charts
Please help me with a vba program that will hide and show on command.
Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding charts
Some good advice here... http://www.cpearson.com/excel/newposte.htm Assume you are referring to a fairly recent version of Excel, (but not xl2007), running on Windows. Also that the chart is an embedded chart on a worksheet, not a separate chart sheet, then... With ActiveSheet.ChartObjects("MyChartName") .Visible = Not .Visible End With -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message Please help me with a vba program that will hide and show on command. Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding charts
Thank you, Jim
"Jim Cone" wrote in message ... Some good advice here... http://www.cpearson.com/excel/newposte.htm Assume you are referring to a fairly recent version of Excel, (but not xl2007), running on Windows. Also that the chart is an embedded chart on a worksheet, not a separate chart sheet, then... With ActiveSheet.ChartObjects("MyChartName") .Visible = Not .Visible End With -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "dan" wrote in message Please help me with a vba program that will hide and show on command. Thanks |
#4
|
|||
|
|||
I assume from the title you mean hide/unhide charts. The format menu has a Chart - Hide option.
If your chart is imbedded on sheet1, this routine will toggle its visiblity Code:
Sub toggleImbeddedChart() With ThisWorkbook.Worksheets("sheet1").ChartObjects("chart 1") .Visible = Not (.Visible) End With End Sub Code:
Sub toggleChartSheet() With ThisWorkbook.Sheets("Chart1") .Visible = Not (.Visible) .Activate End With End Sub |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding charts
Very nice! Thank you, Mike
"mikerickson" wrote in message ... I assume from the title you mean hide/unhide charts. The format menu has a Chart - Hide option. If your chart is imbedded on sheet1, this routine will toggle its visiblity Code: -------------------- Sub toggleImbeddedChart() With ThisWorkbook.Worksheets("sheet1").ChartObjects("ch art 1") .Visible = Not (.Visible) End With End Sub -------------------- This will toggle a chart sheet. Code: -------------------- Sub toggleChartSheet() With ThisWorkbook.Sheets("Chart1") .Visible = Not (.Visible) .Activate End With End Sub -------------------- dan;510529 Wrote: Please help me with a vba program that will hide and show on command. Thanks -- mikerickson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hiding Charts | Charts and Charting in Excel | |||
hiding unused categories in charts | Excel Discussion (Misc queries) | |||
hiding charts w/o data | Excel Worksheet Functions | |||
hiding zero values in stacked bar charts | Charts and Charting in Excel | |||
hiding zero values in charts | Charts and Charting in Excel |