I am automating a graph from Access but have a specific excel question.
I have a Point with the ShowCategoryName = True
The CategoryName is a date
On the graph the date appears dd/mm/yyyy eg 01/10/2008 (which is as I expect as I have a regional setting which matches this)
But for this point with this (assuming that mypoints is set to one of the points)
Code:mypoints.DataLabel.TextThey produce 10/01/2008 ie mm/dd/yyyyCode:mypoints.DataLabel.Caption
I imagine the answer is either
I am dreaming?
Access is screwing with the date (would not be the first time)?
or ???????
The second part of datalabels is Alignment. I am trying to get my Datalables to an exact position. However if the text of the datalabel is longer then the left hand start of the label starts more to the left which appears to mean that the text is still centred.
Code:For Each mypoints In Me![Graph0].SeriesCollection(1).Points With mypoints.DataLabel .Font.Size = 9 .HorizontalAlignment = xlLeft .Left = .Left - 15 .Top = .Top - 115 .Text = labeltext .Orientation = 75 End With Next mypoints
Last edited by darbid; 07-23-2009 at 06:05 PM.
ok so the dates just come as american I will deal with it blindly.
And it appears that setting the datalabels like this gives them a better chance of being all Aligned properly.Code:.Text = labeltext .Font.Size = 10 .HorizontalAlignment = xlLeft .VerticalAlignment = xlTop .Position = xlLabelPositionAbove .Orientation = 35 .Left = .Left + 25 .Top = .Top - 105
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks