Closed Thread
Results 1 to 2 of 2

How to add data label callouts in NewSeries with VBA

  1. #1
    Registered User
    Join Date
    04-28-2020
    Location
    london, england
    MS-Off Ver
    2019
    Posts
    3

    How to add data label callouts in NewSeries with VBA

    Hello, I am new to VBA Chart. Can anyone help me to see how to add data label callouts ( show as "[Value in X axis, Value in y axis]" in following NewSeries (MyNewSrs for my case) below? thank you!

    Dim myChtObj As ChartObject
    Set myChtObj = mysht.ChartObjects.Add(Left:=100, Width:=500, Top:=25, Height:=200)
    Set MyNewSrs = myChtObj.Chart.SeriesCollection.NewSeries
    With MyNewSrs
    .Name = "Test1"
    .DataLabels.Position = xlLabelPositionAbove
    .Values = myArray1
    .XValues = myArray2
    .ChartType = xlXYScatter
    .AxisGroup = xlPrimary
    .MarkerStyle = xlMarkerStyleSquare
    .MarkerSize = 5
    .MarkerBackgroundColor = vbRed
    End With
    Set MyNewSrs = Nothing

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: How to add data label callouts in NewSeries with VBA

    Administrative Note:

    Welcome to the forum.

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to add data label callouts in NewSeries with VBA
    By tony7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2021, 08:57 AM
  2. Add NewSeries problem ?
    By HerryMarkowitz in forum Excel Charting & Pivots
    Replies: 13
    Last Post: 05-11-2015, 04:14 AM
  3. SeriesCollection.NewSeries Data Points not proper
    By mangalam.singhania in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2013, 08:50 AM
  4. Disappearing Callouts
    By edwardpestian in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2006, 06:29 PM
  5. Line colour of .SeriesCollection.NewSeries?
    By Dr.Ile in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2005, 03:05 PM
  6. [SOLVED] Callouts in Charts
    By Paul Sexton in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 06-04-2005, 08:05 PM
  7. [SOLVED] How do i create callouts for a graph?
    By miami7680 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-23-2005, 07:06 AM

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.6.0 RC 1