Solved

Can't add data labels to data series on secondary axis

Posted on 2015-02-23
2
117 Views
Last Modified: 2016-02-10
Hello,
I've been trying to add data lables to a line data series on a secondary axis via vba.  The labels are not being displayed.  When I try to add the data labels manually, I get the following message, "The maximum number of data labels that can be displayed is 1000.  Some labels will be remitted from the chart"  .  The chart contains only 100 labels. I've attached the pdf file of the chart.

With objNewSeries
            .Name = "Aggregate LIFR (Non-NEX)"
            .Values = objXlDataSheet.Range("F:F")
            .AxisGroup = 2
            .ChartType = 65
            .Format.Line.Weight = 1
           .ApplyDataLabels
         .DataLabels.NumberFormat = "0.0%"
        End With

Open in new window

PDF-File.pdf
0
Comment
Question by:chtullu135
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40627537
Hi,

maybe you could restrict the range

instead of

.Values = objXlDataSheet.Range("F:F")


.Values = objXlDataSheet.Range(Range("F1"), Range("F" & Cells.Rows.Count).End(xlUp))


Regards
0
 

Author Closing Comment

by:chtullu135
ID: 40634235
Thanks that's what I needed.  I just needed to modify the provided code so that it would work using late-binding.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question