Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    2

    Unanswered: XY scatter chart label macro problems

    I have a XY scatter chart that I need to add labels to.
    I have and use Rob Bovey's XY Chart Labeler
    But it dosent seem to work when the origional data gets filtered using auto filter.

    I decided to use the macro in MS KB Article 213750 but when the macro gets to the following point it creates a

    Microsoft Visual Basic
    Run-time error '1004':
    Application-defined or object-defined error

    Or Just

    Microsoft Visual Basic
    400

    For Counter = 1 To Range(xVals).Cells.Count
    ActiveChart.SeriesCollection(1).Points(Counter).Ha sDataLabel = _
    True
    ActiveChart.SeriesCollection(1).Points(Counter).Da taLabel.Text = _
    Range(xVals).Cells(Counter, 1).Offset(0, -1).Value
    Next Counter

    I have tried stepping through the code and it will not past the first line in the For Counter. Also the main spredsheet is about 800 rows

    I'm now at my wits end as to why it breaks at this point
    I have created a test file with some dummy data to test and it works fine.

    In this spreadsheet there are no other macros and no other code.

    Any Help or insight would be appreciated

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Howdy and welcome to the board.

    How have you defined "xVals"?
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Feb 2008
    Posts
    2
    Yes All Values have been defined and I have moved the labels to the left of the xVal as per the KB article.

  4. #4
    Join Date
    Oct 2003
    Posts
    1,091
    Yes, but how have you defined xVals?
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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