+ Reply to Thread
Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 54
  1. #31
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Thanks Andy.

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

    Re: Unable to connect data markers

    Deleting or assigning series based on empty cells will cause a problem.

    If you switch chart type to column before deleting that should help.

    I have also changed the way the ranges are assigned so only values rows are used.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #33
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Thank you for your kind response.

    When I tried opening the file you sent, it display a Run time Error: '9', Subscript out of range. What could have triggered this? Thanks.

    - Ravi

  4. #34
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Another observation was that the Pay Policy line is flat on the axis, which should not be the case. Thanks.

    - Ravi

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

    Re: Unable to connect data markers

    The subscript error is caused by you selecting a sheet that does not exist in the file.

    Code:
    Private Sub Workbook_Open()
        UserForm1.Show
        Sheets("Splash Screen").Select  ' No sheet
    End Sub
    Check the range used for that series, is it correct?
    Cheers
    Andy
    www.andypope.info

  6. #36
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    I will check on what you have asked and let you know.

    Meanwhile, I noticed that you have created a Macro1. Not sure where you are calling this routine from though. Thanks.

    - Ravi

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

    Re: Unable to connect data markers

    Probably redundent code used whilst testing.
    I use the macro recorder to generate code sometimes
    Cheers
    Andy
    www.andypope.info

  8. #38
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Quote Originally Posted by Andy Pope View Post
    The subscript error is caused by you selecting a sheet that does not exist in the file.

    Code:
    Private Sub Workbook_Open()
        UserForm1.Show
        Sheets("Splash Screen").Select  ' No sheet
    End Sub
    Check the range used for that series, is it correct?
    Hi Andy:

    Yes, the series for the pay policy line was not right. Looks OK now. I will trest and let you know the outcome. Thanks.

    - Ravi

  9. #39
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Here is the problem I am experiencing:

    When displaying the pay structure graph, it displays correctly the first time this button is clicked. However, on any subsequent occasions, it does not display the pay grade or pay range lines, except for the first pay grade. It also gives the following message: “Run Time Error 1004 – This object has no legend."

    I have attached the file for your convenience. Thanks.
    Attached Files Attached Files

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

    Re: Unable to connect data markers

    make sure the chart has a legend before excuting the command

    Code:
    ActiveChart.HasLegend = True   ActiveChart.Legend.LegendEntries(ActiveChart.Legend.LegendEntries.Count).Delete
    Cheers
    Andy
    www.andypope.info

  11. #41
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Thank you for your kind response.

    I included the statement you suggested and tested the outcome. Wheat I see happening now is that I keep getting legends such as "Series 4", "Series 5" and so on with each time the Display Graph button is clicked. Is this expected?

    Thanks.

    - Ravi

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

    Re: Unable to connect data markers

    I don't get this when testing.

    You already have code to remove excess series
    Code:
        'Delete any series beyond Series 3 - July 18, 2008
        With ActiveSheet.ChartObjects(1).Chart
            Do While .SeriesCollection.Count > 3
                .SeriesCollection(4).Delete
            Loop
        End With
    Cheers
    Andy
    www.andypope.info

  13. #43
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Hi Andy:

    Thank you for your kind response.

    As stated in my previous email, I added the code you suggested. Then here is what I did:

    1. Clicked the Display Graph button
    2. The graph was displayed properly with the legends Maximum $, Minimum $, and Pay Policy Line displayed partially in the gray area of the chart.
    3. Clicked the Return button above the graph
    4. For testing purposes, I clicked again on Display Graph. Observed that a new legend Series4 was introduced along with those stated in (2) above.

    My assumption is that if the Display Graph button is clicked more than once, then the above can happen.

    Can this be prevented, since the Display Graph button can be clicked many times for various reasons.

    Also can the font of the legends on the right side of the graph be reduced, then perhaps they won't show up in the gray area of the graph.

    Thanks Andy.

    - Ravi

    P.S. I tested on a clean copy and noticed that the first time the Display Graph button was clicked, the legend on the right side of the graph were in a small rectangle and was displayed on the top right corner and just had Maximum and Minimum. When I clicked the Display Graph button again, then the same legend was display right in the gray area of the graph and included the "Pay Policy Line".
    Last edited by ravichander; 11-08-2009 at 04:29 PM. Reason: To include another observation

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

    Re: Unable to connect data markers

    I still can not reproduce the problem you describe.
    I can press multiple times the display and return button. I can even delete legend entries or the whole legend and the chart is rebuit.

    change font size using
    Code:
        ActiveChart.Legend.Font.Size = 10
    Cheers
    Andy
    www.andypope.info

  15. #45
    Forum Contributor
    Join Date
    06-23-2008
    Posts
    116

    Re: Unable to connect data markers

    Andy:

    Thank you for your kind response.

    For your convenience, I have attached a test copy that illustrates what I have been experiencing. Try the attached file to see what goes on. Thanks.

    - Ravi
    Attached Files Attached Files

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