2

How I get color stops on a shape? I'm creating a tree flow chart, and I want to give them a gradient and I also want to change the gradient by percentage, so I want that one node is with 50% for the both color stops.

So the code that I have until now for the give a gradient pattern is:

        QNode.Shapes(1).Fill.TwoColorGradient msoGradientVertical, 1

I was trying something like:

QNode.Shapes(1).Fill.Interior.Gradient.ColorStops.Add(0.66)

Not working...

Specification: Should work on 2003

1 Answer 1

5

I found the solution:

        With QNode.Shapes(1).Fill
            .ForeColor.RGB = RGB(255, 255, 255)
            .TwoColorGradient msoGradientVertical, 1
            .GradientStops(2).Color = RGB(0, 0, 0)
            .GradientStops(2).Position = 0.66               
        End With

I just have to use GradietStops =D with the position that I want, in that case, I just want two positions, so gradientStops(1) and gradientStops(2), but you also can add more positions.

      .GradientStops.Insert RGB(0, 0, 0), 0.66
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.