I am going insane trying to figureout how to change the default line style width from 2.25 pts in excel 2007. The line is just so fat that it does not work for me.
I have tried saving a chart I made as a template and then applying that template to other charts. Usually the 1st few sets of data will have the proper line width, but the rest default to the thicker line width.
To change the line width I right click the line of data and choose format data series then Line Style which takes me to width, which defaults to 2.25 pt. That is the value that I would like to change to a default of 1pt.
Can this be done? I have tried most of the day and have not come up with a way to change it.
The template is the way to do it. But the template will only remember the variations you set.
So if you set 2 lines to 1pts then it will format charts for 2 lines only.
You need to add 255 series to your chart and format all of them before saving template. This should then apply the formatting to all you lines new charts and those you apply the template to.
Thanks for the info. I ended up trying a little smaller, only 30 series and it seemed to work.
Thanks
Sub ChartLineWidth() Dim c As Chart, s As Series For Each co In ActiveSheet.ChartObjects() Set c = co.Chart For Each s In c.SeriesCollection s.Format.Line.Weight = 1 Next s Next co End Sub
Last edited by Gregor y; 10-24-2011 at 08:59 PM. Reason: add code tags
..........
Last edited by Gregor y; 10-24-2011 at 10:06 PM. Reason: sorry i got this on the wrong bbs somehow.
As an extremely novice user of VBA, I know where to enter the code, but how do I save it so it runs automatically every time I open Excel and use for graphs? If I have to run a Macro, so be it, but I was hoping to change the default so it automatically uses the 1 pt. line for graphs. Thanks!
I would suggest you use Andy Pope's suggestion of a chart template with the series lines pre-formatted to 1pt.
Good luck.
Andy (or anyone),
This approach sounds simple and straight forward, but I apparently need a little additional help. I created a small file with 30 columns of data (30 should be adequate for my purposes). I created a chart with all 30 columns and made the formatting changes (changed line width to 0.5 for each line). I typcially move my charts to a new worksheet (if that makes any difference). I then saved the file as a template (Book.xltx in C:\Program Files\Microsoft Office\Office14\XLSTART). I restarted Excel, copied new data from another book into a new sheet, and generated a new chart. Unfortunately the new chart still uses fat (2.5) lines. What am I missing?
Thanks in advance.
Did you create the chart based on your style?
Did you set your style to be the default style?
I had never noticed the chart styles until you mentioned it, so no, I have created my charts based on a particular style or set the default. Each of the options I see has the wide (fat) lines though. I am using xy-scatter line graphs.
How do you customize a style and then save it as the default?
Thanks,
Serge
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks