+ Reply to Thread
Results 1 to 5 of 5

Excel Series Collection Name Property not working as expected

  1. #1
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Excel Series Collection Name Property not working as expected

    Hello all,

    I've been experiencing weird results when trying to add a new chart series using VBA, and while referencing an Excel Table. Below is the portion of my code that I am using; note that the series is successfully added, and the XValue and Value properties reference the cells within the Excel Table correctly. However, the Name property hard codes the series input as text, not as a cell reference like the XValue and Value properties are stored.

    Any tips on what could be causing the error is appreciated!

    Please Login or Register  to view this content.
    PS: The list columns are labeled correctly. My customer has the table formatted in a weird way and I'd rather not move fields around if possible.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel Series Collection Name Property not working as expected

    Try this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Excel Series Collection Name Property not working as expected

    That did it! Can you explain why the .Address method was required?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel Series Collection Name Property not working as expected

    Quote Originally Posted by mcmahobt View Post
    That did it! Can you explain why the .Address method was required?
    You're welcome.

    The Name property is a string and will accept only text. It will evaluate a cell address in the form of "=SheetName!R1C1"

    The Values and XValues properties are variants and will accept a Range or Array of values.

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Excel Series Collection Name Property not working as expected

    Clear enough, appreciate the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 02-29-2016, 02:44 AM
  2. [SOLVED] Excel Code Not Working As expected
    By kapeller in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-02-2014, 06:49 PM
  3. Excel VBA RemoveDuplicates not working as expected
    By mcwsky09 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-27-2014, 12:06 AM
  4. Excel autofill not working as expected
    By avp3000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2013, 02:14 AM
  5. [SOLVED] 'Find' not working as expected (Excel vba).
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2013, 12:01 PM
  6. Replies: 2
    Last Post: 12-23-2011, 11:04 AM
  7. [SOLVED] Using a collection as a property
    By cantonarv in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2005, 01:05 PM

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