Arjun has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Excel VBA (Userforms)
How do I place a userform onto a excel chartsheet (which is on a separate tab) next to the chart in-place of lengend ? I have XY Scatter graph with lines and markers, but because I have over 20 series (could vary), it gets very populated. I am trying to create a userform with buttons for each series, which will enable me to select/deselect individual series that I want view (not just individual but also multiple). How do I implement this?
I would appreciate if anyone can help me with this.
Thank you.
RE: Excel VBA (Userforms)
Hi Arjun
Thanks for getting in touch. After a little research it's not very easy to do this with a VBA userform. The code required would be very complex and prone to breaking.
If you have to program this with VBA, have a look at some of the excellent tutorials on Jon Peltier's site:
http://peltiertech.com/
You can also achieve similar results using Excel's filtering tools. Here's a useful tutorial:
http://chandoo.org/wp/2009/02/12/make-a-dynamic-chart-using-data-filters/
You might want to consider putting your data into a PivotChart if possible. This will enable you to add a Slicer with no programming, and users could then add and remove the series as much as they like.
If this feature is a deal-breaker for you, consider upgrading to Excel 2013. The exact feature you've described is available by default on all charts.
https://www.stl-training.co.uk/b/exceltraining/2013/05/excel-2013-charts/
Sorry that the answer isn't straightforward!
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
RE: Excel VBA (Userforms)
Thank you for your response.
I am aware of the autofilter method which can be used on the underlying data.
Unfortunately this is not for my personal use, I am developing this feature for other users. But yes filtering on chart sheet is very handy feature available on 2013.