colene
11-20-2008, 11:56 PM
I am using VBA to have dynamic multiline chartline ..it throws me error when the third line is more than 80 characters ..
my Line1 has 50 characters
Line2 - 100 characters
Line 3 till 80 ..Iam able to get ..When it exceeds i get error
mytitle = line1 & Chr(10) & line2 & projDet & sapDet & apDet & meDet & Chr(10) & filterdet
Set chtChart = Charts(1)
With chtChart.ChartTitle
.Text = mytitle
.Characters(0, Len(line1)).Font.Size = 12
.Characters(Len(line1) + 1, Len(mytitle)).Font.Size = 10
'.Characters(0,Len(line1)).Font.Color = 66
End With
my Line1 has 50 characters
Line2 - 100 characters
Line 3 till 80 ..Iam able to get ..When it exceeds i get error
mytitle = line1 & Chr(10) & line2 & projDet & sapDet & apDet & meDet & Chr(10) & filterdet
Set chtChart = Charts(1)
With chtChart.ChartTitle
.Text = mytitle
.Characters(0, Len(line1)).Font.Size = 12
.Characters(Len(line1) + 1, Len(mytitle)).Font.Size = 10
'.Characters(0,Len(line1)).Font.Color = 66
End With