+ Reply to Thread
Results 1 to 3 of 3

Have a macro resize the chart legend

  1. #1
    Registered User
    Join Date
    01-08-2009
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003
    Posts
    15

    Have a macro resize the chart legend

    What I need to do is have the height and width of my legend change based on the number of series and the length of the series names. Picking that information up isn't my problem (the LEN formula isn't exactly a mystery and I already make use of some code to pick up the series count).

    What I'm not sure of is how to translate that into values for height and length. Once I have that I've already used the recorder to get the code to change height and width.

    An example of the workbook is attached. The names used for the series are made up, but it doesn't matter, the names of the series will not be the same each time I update this workbook. A series could be there one month and not for the next several. Example sheet.xlsm

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Have a macro resize the chart legend

    Try removing the legend before processing a chart and then reapply it afterwards.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-08-2009
    Location
    Austin, TX
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Have a macro resize the chart legend

    Looks like that got it. Thanks!

+ Reply to Thread

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