Legend Line Spacing

  • Thread starter Bill Sturdevant
  • Start date
B

Bill Sturdevant

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
 
A

Andy Pope

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top