tom_blamire
Board Regular
- Joined
- Dec 13, 2012
- Messages
- 99
Hi,
I have a basic piece of vba which changes the type of chart from a line chart to a column chart:
The problem i am having is that if this is pressed its works fine. But, if i press it again i get run time error 91 coming up. My question is, once the code has run and changed the chart, if the button is pressed again, how i can get either a message to come up to say this chart is already selected OR do nothing?
Due to formatting reasons, Option button isnt possible.
Please help!
I have a basic piece of vba which changes the type of chart from a line chart to a column chart:
Code:
Sub COLUMN_CHART()
'
ActiveChart.ChartArea.Select
ActiveChart.ChartType = xlColumnClustered
End Sub
The problem i am having is that if this is pressed its works fine. But, if i press it again i get run time error 91 coming up. My question is, once the code has run and changed the chart, if the button is pressed again, how i can get either a message to come up to say this chart is already selected OR do nothing?
Due to formatting reasons, Option button isnt possible.
Please help!