Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am creating a Chart by Macro. In that i have to set the caption Name but not able to set.
I have pasted all the code below. Please have a look and if someone have the solution, pls share.
Thanks in advanced.
Sub FunctionBarChart
set myBarChart=ActiveDocument.ActiveSheet.CreateBarChart
'Getting values from Variable for chart Expression and Dimension
GetBarDimName = ActiveDocument.Variables("vDim").GetContent.String
myBarChart.AddDimension GetBarDimName
GetBarMeasureName = ActiveDocument.Variables("vMeasure").GetContent.String
if GetBarMeasureName = "Minutes" then
myBarChart.AddExpression "Sum(Minutes)"
else if GetBarMeasureName = "Hours" then
myBarChart.AddExpression "Sum(Minutes)/60"
else if GetBarMeasureName = "WeekOf" then
myBarChart.AddExpression "Count("&GetBarMeasureName&")"
end if
end if
end if
set bcp = myBarChart.GetProperties
bcp.SetCaption.Name = "My Cap"
myBarChart.SetProperties bcp
end sub
Use this for title and caption:
bcp.ChartProperties.Title.Title.v = "My text"
bcp.GraphLayout.WindowTitle.v = "Xyz"
- Marcus
Use this for title and caption:
bcp.ChartProperties.Title.Title.v = "My text"
bcp.GraphLayout.WindowTitle.v = "Xyz"
- Marcus
Thanks Marcus.
Its working !!!!
Do you have any idea, how can i enable the Menu option in Caption with Macro.
Try this:
bcp.Layout.Frame.MenuIcon=true
- Marcus