I constructed the following subroutines hoping to be able to change the font of an MSChart control title


private Sub MSChartGráficas_TitleActivated(MouseFlags as Integer, Cancel as Integer)
Dim fntName, fntSize, fntColor

Call GetNewFont(fntName, fntSize, fntColor)

MSChartGráficas.Title.Font.Size = fntSize
MSChartGráficas.Title.Font.Name = fntName

End Sub

public Sub GetNewFont(cfntName, cfntSize, cfntColor)
'set default color, font, and size
With dlgGráficas
.Color = cfntColor
.FontName = cfntName
.FontSize = cfntSize
'show color, underline, and strikethrough effects and limit size to _
10-20 points
.Min = 10
.Max = 20
'show font common dialog box
.Flags = cdlCFScreenFonts
.DialogTitle = "Fuentes disponibles"
.ShowFont
'return font name, size, and color through parameters
cfntName = .FontName
cfntSize = .FontSize
cfntColor = .Color
End With

End Sub




but the lines
MSChartGráficas.Title.Font.Size = fntSize
MSChartGráficas.Title.Font.Name = fntName

give me the error that the property is write-only. It is only logical that one would be able to assign a font value to the title using the common dialog window but I can't find any help in my books.

Any ideas? Thanks.

Andrew