+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    11-12-2005
    Posts
    55

    Arrow how to change font size of datalabels of two charts in a sheet

    hey guys
    i have two charts in a sheet
    how to change the font size and AutoScaleFont of datalabels in them
    through VBA??

  2. #2
    Jon Peltier
    Guest

    Re: how to change font size of datalabels of two charts in a sheet

    The required syntax is discoverable using the macro recorder. The final
    result would look something like this:

    For Each chtob In ActiveSheet.ChartObjects
    For Each srs In chtob.Chart.SeriesCollection
    If srs.HasDataLabels Then
    srs.DataLabels.Font.Size = 8
    srs.DataLabels.AutoScaleFont = False
    End If
    Next
    Next

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______

    "amrezzat" <amrezzat.27idpc_1147125001.6653@excelforum-nospam.com> wrote in
    message news:amrezzat.27idpc_1147125001.6653@excelforum-nospam.com...
    >
    > hey guys
    > i have two charts in a sheet
    > how to change the font size and AutoScaleFont of datalabels in them
    > through VBA??
    >
    > --
    > amrezzat




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