Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Legend Line Spacing
Is there a way in VB to force a legend to display in single line spacing
rather than what appears to be double line spacing? I am using the following code to control the display of the legend. Is there a property I can add that will control the line spacing? ActiveChart.Legend.Select Selection.AutoScaleFont = False With Selection.Font .Name = "Arial" .FontStyle = "normal" .Size = 9 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .Background = xlAutomatic End With |
#2
|
|||
|
|||
Hi,
The line spacing is determined by Excel. It uses the size of the legend box, legend text and number of entries to calculate the layout. Unfortunately nothing useful is exposed in the object model to make laying out the legend via code consistent. To manually reduce the line spacing alter the height of the legend box. Cheers Andy Bill Sturdevant wrote: Is there a way in VB to force a legend to display in single line spacing rather than what appears to be double line spacing? I am using the following code to control the display of the legend. Is there a property I can add that will control the line spacing? ActiveChart.Legend.Select Selection.AutoScaleFont = False With Selection.Font .Name = "Arial" .FontStyle = "normal" .Size = 9 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .Background = xlAutomatic End With -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XY Scatter Legend when Edit Individual Markers | Charts and Charting in Excel | |||
coloring overy other line without doing so line by line | Excel Worksheet Functions | |||
double line spacing using excel 2000 | Excel Discussion (Misc queries) | |||
Bulleting text and spacing down a line in Excel | Excel Discussion (Misc queries) | |||
Line chart - date line association gone mad! | Charts and Charting in Excel |