+ Reply to Thread
Results 1 to 2 of 2

Thread: SetSourceData Does not Set Consistently

  1. #1
    Forum Guru Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,274

    SetSourceData Does not Set Consistently

    Hi all,

    I have a couple of problems with my charting project (See attached). When you open the workbook, you'll see the button "Reset" which activates a UserForm. If you pick 5 or less indecies (value names), the chart displays it properly with the index names on the right side that represent all of the series collections. However, if you pick 5 or more, the index names move horizontally on the bottom of the chart, which is not the way I want the chart formatted. I don't know why it is doing this. Also, the list boxes act peculiarly because I have (sometimes) double click them to select a value or, when I do click a value, more than one will be selected. Again, I don't know why this would be happening. There is a lot of code and I'm sorry for that as I don't want make this difficult for you but I have been trying to do this on my own and I am completely stumped! Please help!

    Regards:
    Attached Files Attached Files
    Last edited by Mordred; 10-01-2011 at 08:59 PM.
    Please leave a message after the beep!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: SetSourceData Does not Set Consistently

    Excel will guess whether to plot by rows or columns depending on data and size of the matrix.

    Explicitly set the PlotBy to avoid bad guessing.

        With WsChrt.ChartObjects("Chart 83").Chart
            .ChartType = xlLine
            .SetSourceData Source:=ChrtRng.Cells
            .PlotBy = xlRows
        End With
    Cheers
    Andy
    www.andypope.info

+ 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.2.0