Hi,
The chart title is restricted to 255 characters. Try manually typing in
a very long string. At 255 it will start to bleep.
Either use an embedded textbox.
Or use both chart title and axis title.
Cheers
Andy
blackno666 wrote:
> Hi,
>
> when I try to run the following code (on an existing diagram):
>
> With ActiveChart
> Dim globalLstFile as String
> globalLstFile = "02 KOBA_XYZ_C3-06214 02- 20.7-20.8°C Touchprobe
> Mittelpunkte.lst"
>
> .HasTitle = True
> .ChartTitle.Text = "KOBA Sphere Gauge S/N 38 538 (" + globalLstFile +
> ")" & Chr(10) & _
> "color coding: red = Zone 1, green = Zone 2, blue = Zone 3" &
> Chr(10) & _
> "light color: measurements that contain spheres that are
> within 20 cm of the edge of the measurement volume"
> ...
>
> Excel returns with the error 1004. However, if I set globalLstFile to
> "test", then the code runs just fine. I did not find any limitation on
> .ChartTitle.Text, but I am suspecting that it is limitied to a certain
> number of characters or does not allow special characters.
>
> Any enlightment would be greatly appreciated (sorry for the horrible
> formatting of this text).
> Blackno666.
>
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info