+ Reply to Thread
Results 1 to 8 of 8

Gradient fill a point with 2 general colors (excel 2010)

  1. #1
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Gradient fill a point with 2 general colors (excel 2010)

    Hi all,

    I figured this out in excel, but not in VBA

    I have a line chart with 3 connected points. You can select a single point(excel 2010) and give that a "gradient line" fill. So in VBA, I'd like to make one end (stop @ 0) a given RGB color, and the opposite stop @ 1 another RGB color. I think the default is 3 stops, so I'd also have to make sure there are only the 2 end stops. I can then move to the next pont, do the same thing continuing with the color I left off with, and turn the whole line into a slowly changing color legend that I have prescribed.

    I figured it out manually, just don't know the VBA code.

    Hoping someone can help....thanks!

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

    Re: Gradient fill a point with 2 general colors (excel 2010)

    Have you tried using the macro recorder?

    Post example workbook with 2 charts, a before and after manual formatting.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: Gradient fill a point with 2 general colors (excel 2010)

    Hi,

    Here is a graph. The line on the right is manually edited by selecting individual points, and giving the LINE COLOR a gradient. One is from red to orange, the next from orange to yellow, and it doesn't matter on the 3rd one. The macro recorded none of that detail. This is excel 2010.

    Maybe you can get a VBA macro to do the same on the series on the left?
    Attached Files Attached Files

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

    Re: Gradient fill a point with 2 general colors (excel 2010)

    Appears gradient is only available to fill, not lines, as far as the object mode is concerned.

  5. #5
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: Gradient fill a point with 2 general colors (excel 2010)

    By "object mode", do you mean in VBA in general? It's do-able manually, so perhaps sendkeys, but that's really messy...

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

    Re: Gradient fill a point with 2 general colors (excel 2010)

    Yes I mean VBA.
    Not even sure send keys would work.

    Maybe you can manually create a chart template and apply that

  7. #7
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: Gradient fill a point with 2 general colors (excel 2010)

    I could if I could access the gradient stop RGB colors. That's all I want to change, once set....

  8. #8
    Registered User
    Join Date
    09-23-2007
    Posts
    54

    Re: Gradient fill a point with 2 general colors (excel 2010)

    Don't suppose Microsoft could help....

+ 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