Do you have a reference to the Graph Object Library?
from the design view of any module, link to the Graph Library
from the menu --> Tools, References
check Microsoft Graph #.# Object Library
*** getting coding help for Graph objects ***
from the menu in a module window --> View, Object Browser
OR
F2
On the left, you will probably see a Project window and a Properties
window below it
On the right, you will see the main Object Browser window
change <All Libraries> in the Project/Library combobox in the upper left
of the main window of the Object Browser window
to
Graph
explore each object in Classes
as you select a Class on the left, its members will appear in the pane
on the right
when you see something you want help on, press the F1 key and switch to
the Help window
You will see that Point is one of the classes you can choose -- and you
can see all the properties for the point object listed on the right
1. choose "Point" from Classes
2. click on the "DataLabel" property on the right
3. press the F1 key
this is from help:
'~~~~~~~~~~~~~~~~
Returns a DataLabel object that represents the data label associated
with the specified point or trendline. Read-only.
Example
This example turns on the data label for point seven in series three,
and then it sets the data label color to blue.
With myChart.SeriesCollection(3).Points(7)
.HasDataLabel = True
.ApplyDataLabels type:=xlValue
.DataLabel.Font.ColorIndex = 5
End With
'~~~~~~~~~~~~~~~~~~
1. choose "DataLabel" from Classes
2. click on the "Position" property on the right
3. press the F1 key
it appears that your syntax is correct... so maybe you just need to
reference the library... did you compile the code?
'~~~~~~~~~ Compile ~~~~~~~~~
Whenever you change code or references, your should always compile
before executing.
from the menu in a module window: Debug, Compile
fix any errors on the yellow highlighted lines
keep compiling until nothing happens (this is good!)
Warm Regards,
Crystal
*

have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*