Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I have been using code to loop for each chtobj in a worksheet to set font size right etc. Sometimes an error occur and the size become 1 pt. I can live with that once or so, but I can't change the FONT BACK neither with code nor from excel chart GUI. No code are running in background during this of cource, I try even to change the font from Excel GUI with macro switched off. It can only be solved with building a new chartobject... Have any of you got this error, any knowing why it occure and what I can do about it? I thougt it was because some of the charts had no values or some refere to empty cells, but now, after some hours fixing this, the probelm still come to me.... Please tell me! For the interested: The procedure I ran is an ordinary kind of: LIKE: Dim scol As Series Dim dl As DataLabel For Each scol In chtobj.Chart.SeriesCollection For Each dl In scol.datalabels With dl.Font .Name = "Arial" .FontStyle = "Fet" .Size = 8 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .Background = xlAutomatic End With With dl .NumberFormat = "#,##0" .AutoScaleFont = True End With Next Next OR 'chtobj.Chart.Legend.AutoScaleFont = True With chtobj.Chart.Legend.Font .Name = "Arial" .FontStyle = "Normal" .Size = 8 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic .Background = xlAutomatic End With chtobj.Chart.Legend.Position = xlBottom Regards |