#1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Callouts in 2007

Hello,
I have a VB6 app that launches Excel and generates charts. Currently
we use Excel 2003 but the company is finally adopting 2007. Parts of
the chart display as expected, but the callouts do not behave the
same. The following code works fine in 2003, but doesn't work in
2007. (The sub is called AddLegend even though it should be
AddCallout). There is also another code section where the callout is
positioned and the Shape.Adjustments are made to adjust the callout
line length etc.... The idea is that a chart could have multiple
lines on an X-Y Scatter plot and a callout per line would describe the
series.

Private Sub AddLegend(SeriesText As String)
Dim oNote As Excel.Shape
Dim oCallout As Excel.Shape
Dim lChartHeight As Long
Dim lChartWidth As Long

Set oCallout = mChart.Shapes.AddCallout(msoCalloutThree,
mChart.PlotArea.Width, mChart.PlotArea.Top,
UserControl.ScaleX(TextWidth(SeriesText), vbTwips, vbPoints) * 1.5,
UserControl.ScaleY(TextHeight(SeriesText), vbTwips, vbPoints))

With oCallout
.Visible = msoTrue

.Line.Visible = msoTrue
.Line.BeginArrowheadLength = msoArrowheadLong
.Line.BeginArrowheadStyle = msoArrowheadTriangle
.Line.BeginArrowheadWidth = msoArrowheadNarrow

.Callout.Gap = 0

.TextFrame.AutoSize = True
.TextFrame.Characters.Font.Size = 9
.TextFrame.Characters.Text = SeriesText
.TextFrame.AutoSize = False

.Callout.Border = (mBoxBorders = bbNotesAndLegend) 'msoTrue
.Left = mChart.PlotArea.Width - .Width
.Callout.Angle = msoCalloutAngle45
.Callout.AutoAttach = msoFalse


.Line.Style = msoLineSingle
.Line.Weight = 0.25
.Line.ForeColor.RGB = vbBlack
.TextFrame.Characters.Font.Color = vbBlack


End With
End Sub

The main issues are that auto sizing the textframe doesn't work, even
if I try to use TextFrame2, and
the .Callout.Angle = msoCalloutAngle45 line doesn't seem to do
anything.
The Shape.Adjustments don't work either, but I figured those out.
Their problem is that since I can't seem to set the angle to 45
degrees, the lines are all at different angles.

What I would really like is if someone could point me to a resource
along the lines of "you did this in 2003, do this in 2007 to get the
same results."

Thanks,
Robert

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disappearing text in Callouts Excel 2007 Sue[_3_] Excel Worksheet Functions 1 March 10th 09 06:36 PM
callouts on graph Walter Charts and Charting in Excel 1 August 18th 08 01:17 PM
Callouts - default placement below line? Rachel Garrett Charts and Charting in Excel 1 May 30th 08 05:47 PM
Callouts in Charts Paul Sexton Charts and Charting in Excel 5 June 5th 05 12:06 AM
How do i create callouts for a graph? miami7680 New Users to Excel 2 April 23rd 05 11:11 AM


All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"