Results 1 to 7 of 7

using vba macro to change all charts at same time

Threaded View

  1. #1
    Registered User
    Join Date
    06-09-2014
    Location
    Nairobi, Kenya
    MS-Off Ver
    2010
    Posts
    12

    using vba macro to change all charts at same time

    Hi Everyone,

    I have about 60 charts in my active worksheet that I would like to change the size and font of.
    I already wrote the code to run it on one, but I would like a piece of code that runs it automatically on al the charts in the active worksheet. How should I adjust the code?

    Sub adjustcharts()
    With ActiveChart.Axes(xlValue).TickLabels.font
    .Size = 8
    .color = vbBlack
    .Name = "Calibri (Body)"
    .FontStyle = "Regular"
    End With
    With ActiveChart.Axes(xlCategory).TickLabels.font
    .Size = 8
    .color = vbBlack
    .Name = "Calibri (Body)"
    .FontStyle = "Regular"
    End With
    With ActiveChart.Legend.font
    .Size = 8
    .color = vbBlack
    .Name = "Calibri (Body)"
    .FontStyle = "Regular"
    End With
    With ActiveChart.Parent
    .Height = 216 ' resize 2.5 pt at 72 ppi.
    .Width = 328.32 ' resize 4.0 pt at 72 ppi.
    
    End With
    End Sub



    Thanks a million!!

    Crosspost: http://www.mrexcel.com/forum/excel-q...eet-macro.html
    Last edited by tessawanders; 06-09-2014 at 02:54 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. change order of graphs when using macro to export all excel charts to powerpoint
    By silencer27 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 06:48 AM
  2. Replies: 0
    Last Post: 06-29-2013, 04:25 AM
  3. [SOLVED] Change default chart in a macro to prevent run time error when creating a pivot charts
    By herbie226 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-14-2013, 10:01 AM
  4. [SOLVED] macro to change charts by name
    By katto01 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2012, 10:19 AM
  5. Worksheet change macro takes too much time when run with update list macro
    By hunsnowboarder in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2009, 09:40 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