+ Reply to Thread
Results 1 to 2 of 2

Referring to a Variable Range of Columns for the SetSourceData Method

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    12

    Referring to a Variable Range of Columns for the SetSourceData Method

    So, I'm trying to generate charts automatically. My data is imported from CSV, and there are a variable number of columns of data. I count the number of columns of data I want to plot. Now all I need is to refer to those columns by number such that I return a range holding all the data I want to plot. My code is of the form:

    Please Login or Register  to view this content.
    I've tried a few things, detailed below with the given error codes



    Please Login or Register  to view this content.
    I'm sort of at a loss as what to do. Any thoughts?
    Last edited by DobbsHead; 11-29-2012 at 03:59 PM.

  2. #2
    Registered User
    Join Date
    09-05-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Referring to a Variable Range of Columns for the SetSourceData Method

    Well, I solved the problem and feel like a fool. The issue was how I was passing .SetSourceData the range object. VBA is inconsistent about how it like to pass range objects. Example:

    Please Login or Register  to view this content.
    So yeah, the problem is solved. Hope this helps somebody else with the same issue.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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