+ Reply to Thread
Results 1 to 2 of 2

2003 chart macro problem in 2007

  1. #1
    Registered User
    Join Date
    02-24-2009
    Location
    PA, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    2003 chart macro problem in 2007

    hello -

    I have a workbook created in Excel 2003 that does a lot of data manipulation and presentation by dynamic pivot table creation and charting, controlled by a single userform. It is all VBA, no worksheet functions or static graphs at all - everything built at runtime.

    My problem is that a series of stacked bar charts created by adding series from output pivot tables are not fully functioning in 2007. The seriescollection.Name is pulling the correct name, and the seriescollection.Value is sending the correct value, but no bars show up and series formatting does not occur. Oddly, the legend is always correct and there is no error - the data simply isn't charted. Do I need to change how I reference the series data?

    Applicable code:

    Please Login or Register  to view this content.
    Thanks for any help - I feel it's something easy, like a different object reference, but haven't had any luck.

  2. #2
    Registered User
    Join Date
    02-24-2009
    Location
    PA, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: 2003 chart macro problem in 2007

    I actually figured it out myself. Excel 2007 only takes the .Name and .Value arguments as strings with the appropriate enclosures or cell refs, while 2003 was more variable and you could just pass an argument to it.

    Therefore, you have to have:

    Please Login or Register  to view this content.
    so that the value is entered into the series as the formula ={54} (54 for example), and the name is entered into the series as the formula ="Name" (Chr(34) gives a single set of double quotes)

    Hope others can get use from this - I've been searching for an answer for 2 days.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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