Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 07-23-2009, 03:25 AM
darbid darbid is offline
Registered User
 
Join Date: 09 Nov 2008
Location: germany
Posts: 40
darbid has been very helpful
Formating a datalabel point and a DATE problem

Please Register to Remove these Ads

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.Text
Code:
mypoints.DataLabel.Caption
They produce 10/01/2008 ie mm/dd/yyyy

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 05:05 PM.
Reply With Quote
  #2  
Old 07-23-2009, 05:04 PM
darbid darbid is offline
Registered User
 
Join Date: 09 Nov 2008
Location: germany
Posts: 40
darbid has been very helpful
Re: Formating a datalabel point and a DATE problem

ok so the dates just come as american I will deal with it blindly.

Code:
.Text = labeltext
        .Font.Size = 10
        .HorizontalAlignment = xlLeft
        .VerticalAlignment = xlTop
        .Position = xlLabelPositionAbove
        .Orientation = 35
        .Left = .Left + 25
        .Top = .Top - 105
And it appears that setting the datalabels like this gives them a better chance of being all Aligned properly.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump