View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
faith faith is offline
external usenet poster
 
Posts: 2
Default Problem setting Charttitle in VB

Peter,

Thanks for the insight. Could you please give me some code sample as
to how to

.... then paste long text. The copy source would need to be text, say
copied from the inputbar, rather than a cell.

With code, would need to insert characters into the textframe in
chunks of
less than 255 at a time.

Again, thanks for your help!

Faith


Peter T wrote:
"David Welch" wrote in message
...
faith wrote:
Hi,

Our client requested a chart with a title longer than 255. Is there a
work-around?

Thanks!

Faith



Code sample:

Dim xlCH As Excel.Chart
xlCH.HasTitle = true
xlCH.ChartTitle.Text = "some character string longer than 255..."

Reference a range rather than hard-code the text.


I don't think that's possible, either with code or manually by selecting the
title, then in the input bar enter =A1. Whatever text in the cell over 255
gets truncated to 255-

But I might be wrong ?

Could insert a textbox from the drawing toolbar into the chart, then paste
long text. The copy source would need to be text, say copied from the input
bar, rather than a cell.

With code, would need to insert characters into the textframe in chunks of
less than 255 at a time.

Regards,
Peter T