Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel ApplyDataLabels property
Message
From
07/06/2001 03:11:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/06/2001 16:33:00
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00516033
Message ID:
00516180
Views:
12
>ok, I give up. I can't get this part to run. It fails in the
>"SeriesCollection(1).ApplyDataLabels.Type=3"
>saying it does not evaluate to an object.
>All I want to do is to show percentage in the data labels.
>what am I missing here?
>
>
>WITH oBook
>.ActiveChart.SeriesCollection(1).Select
>.ActiveChart.SeriesCollection(1).ApplyDataLabels.Type=3
>.ActiveChart.ChartTitle.SELECT
>.ActiveChart.ChartTitle.AutoScaleFont = .T.
>.ActiveChart.ChartTitle.FONT.NAME = "Arial"
>.ActiveChart.ChartTitle.FONT.FontStyle = "Bold"
>.ActiveChart.ChartTitle.FONT.SIZE = 36
>ENDWITH

Edgar,
I thought we resolved this before, or it wasn't you ? :)
ApplyDataLabels is a method not an object and Type is parameter name of it not a property. In VFP you can't use named parameters but positional.

ApplyDataLabels syntax :
expression.ApplyDataLabels(Type, LegendKey, AutoText, HasLeaderLines)
expression Required. An expression that returns a Chart, Point, or Series object.

All parameters are optional. If you omit anyone it uses the default. ie: If a method has 7 parameters and you only want to define 2nd and 4th :
..SomeMethod(,Par2,,Par4)
.ActiveChart.SeriesCollection(1).ApplyDataLabels(3)
However this call might still fail if type-3 is unavailable for the chart type (percent labels is only available for pie and doughnut charts).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform