Results 1 to 7 of 7

Thread: [RESOLVED] Get chart datarange

  1. #1

    Thread Starter
    Fanatic Member AccessShell's Avatar
    Join Date
    Oct 2013
    Posts
    790

    Resolved [RESOLVED] Get chart datarange

    I have a line chart.

    I can run this code either as macro or within VB6
    Code:
    ActiveChart.SeriesCollection(1).Select    ActiveChart.SetSourceData Source:=Sheets("Activity").Range( _
            "A5:A1102,L5:L1102"), PlotBy:=xlColumns
    This is the result of changing the previous to 1102 manually in the 'record new macro' tab of Excel.

    I need to run some code that can tell me the 1102 (or the value that is there before I upgrde it the 1102.

    I hope that I am clear.

    Thanks

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Get chart datarange

    Do you want to run it in a macro, or in VB6?
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Fanatic Member AccessShell's Avatar
    Join Date
    Oct 2013
    Posts
    790

    Re: Get chart datarange

    I want to run it in VB6

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Get chart datarange

    How does that make a difference? Same Excel Object Model fiddling either way. The answer will be found by studying the Excel documentation, not VB6.

  5. #5
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    Re: Get chart datarange

    Moderator Action: Moved to office development.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  6. #6
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,418

    Re: Get chart datarange

    So basically, you want to find the Last Row in Excel using VBA? *hint hint hint*
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  7. #7

    Thread Starter
    Fanatic Member AccessShell's Avatar
    Join Date
    Oct 2013
    Posts
    790

    Re: Get chart datarange

    Thank you Dilettante for you inspiration. I go the solution from the MrExcel forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width