+ Reply to Thread
Results 1 to 3 of 3

Using VBA to make a chart

  1. #1
    Registered User
    Join Date
    06-29-2009
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    8

    Using VBA to make a chart

    I have the following code to create a 3D line graph:

    Please Login or Register  to view this content.
    I want to re-use this for different graphs, but the range is never the same. What could I put in the Range command to tell it to select all the cells with the data for my different worksheets? Each worksheet only has the graph data and nothing else. Thanks!
    Last edited by rfedeleo; 07-16-2009 at 12:49 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Using VBA to make a chart

    Hi Rfedeleo,

    Put this in the ThisWorkbook module, it should work:
    Please Login or Register  to view this content.
    Or, without declaring an object, simply use:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-29-2009
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Using VBA to make a chart

    Worked great thanks Paul! I'm a VBA noob and that "UsedRange" property is gonna help me out on a bunch of other things I'm doing.

+ 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