+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    11-09-2008
    Location
    germany
    Posts
    74

    Formating a datalabel point and a DATE problem

    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 06:05 PM.

  2. #2
    Registered User
    Join Date
    11-09-2008
    Location
    germany
    Posts
    74

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0