I am using Microsoft Excel for Microsoft 365 MSO 64-bit.
I am using Microsoft Excel for Microsoft 365 MSO 64-bit.
I don't see any reference to line types in the properties or methods. Here is the spec sheet link:
https://docs.microsoft.com/en-us/off...nd%28object%29
However, I find that it can be manually set in xl2013 by right click in the chart area, the click Format Chart Area and work from the menus that are provided. Still looking for vba method.
Last edited by JLGWhiz; 09-20-2020 at 03:40 PM.
Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
Just when I think I am smart, I learn something new!
After some experimenting, this worked.
Line styles are the same syntax for all objects, so you can eaily change them, eg. xlContinuous and xlDouble, etc.Please Login or Register to view this content.
Weight will determine the thickness of the line. Weight = xlThin
As I said previously, these can be set manually.
Last edited by JLGWhiz; 09-20-2020 at 04:24 PM.
This is for the legend entries, rather than the border around the legend.
Please Login or Register to view this content.
The OP was not clear about whether they wanted vba or just a manual procedure. But in vba it looks to me like the ChartFormat object is the key to lines and border formatting. LegendFormat and LineFormat are both part of ChartFormat. Object Browser is not clear on the legend.format but the code works, so that is what matters.
Last edited by JLGWhiz; 09-21-2020 at 10:07 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks