+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : VBA XY scatter plot problems

  1. #1
    Registered User
    Join Date
    05-29-2009
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    2

    VBA XY scatter plot problems

    Hi all,

    I am new to VBA, and I'm using Excel 2007 to do some automated graphing for work. Anyhow, I am having heck of a time getting a macro I am working on to do what I want. Here's what's happening:

    1. I record the macro - I select both columns in the attached sheet - Go to insert chart- select the XY scatter plot - and it gives me a linear graph with the XY axis in the right place (A is X axis, B is Y axis). However, when I run this macro, it totally screws up the axis variables, and my graph comes out incorrect - I can eve tell where it's getting mixed up.

    I realize at this point the chart wizard would be appropriate, but I need automation to be incorporated within this sheet. I am writing this macro because I will need to append this graph with new curves as I bring more columns of data in, but I can't even get it to do a simple plot yet - Any ideas?

    Attached is the document

    Here is the code for reference:

    Please Login or Register  to view this content.



    Thanks!

    Jordan
    Attached Files Attached Files
    Last edited by jordan_schultz; 05-30-2009 at 07:58 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA XY scatter plot problems

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add code tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-29-2009
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VBA XY scatter plot problems

    I added the above code tags - Is this what you were referring to? Sorry for the mess up.

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

    Re: VBA XY scatter plot problems

    I change the code slightly so it should be easier to adapt for future use.

    Please Login or Register  to view this content.
    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.6.0 RC 1