Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm using a macro to swap out dimensions on a chart via button. However, when the new dimension is inserted, I lose the custom label, which is a variable 'vTimeView'. I'm looking for the VB syntax to update the dimension label for object CH54. Thoughts?
Thanks,
Kevin
I think they're calling the attribute Title for dimensions (even though there is a ShowLabel attribute as well).
From the API Guide:
set chart = ActiveDocument.Activesheet.CreateStraightTable
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
chart.AddExpression "count(Customer)"
set cp = chart.GetProperties
set dims = cp.Dimensions
dims(0).Title.v = "Type of product"
chart.SetProperties cp
Keep in mind the dimensions are an array, so if you have more than one, make sure you refer to the correct one. dims(#).