+ Reply to Thread
Results 1 to 5 of 5

Chart macro

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Chart macro

    Hey everyone. I'm trying to make a scatterplot so what I did was recorded a macro and now I want to be able to update it using a for-loop. Here's my code.

    Please Login or Register  to view this content.
    My problem is with the three lines of .Name, .Values, and .XValues. When I run, I get a compile error of Method or Data Member Not Found.

    I need to be able to create a new series each time the if-statement is run through and change the name, y-vals, and x-vals of the series according to my variables of counter2 and position2. Help me please!
    Last edited by monk2211; 02-11-2009 at 10:05 AM.

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

    Re: Chart macro

    Try this

    Please Login or Register  to view this content.
    If not post example workbook
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Chart macro

    That fixed my compile error, but now I get a new one:

    Run-Time Error '438':
    Object doesn't support this property or method.

    Example workbook attached. Scroll down to the GRAPH comment.
    Last edited by monk2211; 02-11-2009 at 10:05 AM.

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

    Re: Chart macro

    Chart sheets do not have a cells property.

    try this revised code
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-11-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Chart macro

    That worked perfect! Thank you!

+ 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