Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change graph type
Hi
Is there a way to flip a graph type between, say, a bar and a pie chart just by clicking a single on-screen user button? I know it's easy by right-clicking the graph and selecting the appropriate option, but it's an on-screen option I'm wondering about. Thanks in advance Steve |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change graph type
Sorry, to clarify. I can make the change once by using the following
command button code: Private Sub CommandButton1_Click() ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.ChartArea.Select ActiveChart.ChartType = xlLine End Sub However, what I want to do is revert back to the original format the second time the command button is clicked. Thanks Steve |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change graph type
I think this will work. If you set up a variable, my_graph, and
initalise it to "xlLine", then you can toggle this between pie chart and bar chart within your code and change the bottom line to: ActiveChart.ChartType = my_graph Pete |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Change graph type
Pete
I had to experiment a bit as I wasn't sure quite what you meant, but have managed it now. Thanks! Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
changing the color of a single bar on a graph | Charts and Charting in Excel | |||
How can I change a graph with 2 bars,2 lines to 3 bars, 1 line? | Charts and Charting in Excel | |||
How do you change the values of a graph on the x-axis? | New Users to Excel | |||
How to prevent Excel 2003 from automatically change chart type | Charts and Charting in Excel | |||
How do I change file/open/"files of type" to default to "all file. | Excel Discussion (Misc queries) |