Radial Color Gradient

Dossfm0q

Board Regular
Joined
Mar 9, 2009
Messages
194
Below code fill liner I need to fill Radial Color Gradient

THX
Code:
Public Sub RadialColorGradient()


    Dim Shp As Shape
    With ActiveSheet
            For Each Shp In .Shapes
                If Shp.Name = "MyShape" Then Shp.Delete
            Next
            
            .Shapes.AddShape(msoShapeRectangle, 50, 50, 72, 72).Name = "MyShape"
            
            With .Shapes("MyShape").Fill
                .ForeColor.RGB = RGB(0, 128, 128)
                .OneColorGradient msoGradientHorizontal, 1, 1
                .GradientStops.Insert RGB(255, 0, 0), 0.25
                .GradientStops.Insert RGB(0, 255, 0), 0.5
                .GradientStops.Insert RGB(0, 0, 255), 0.75
            End With
    End With
        


End Sub
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,089,250
Messages
5,407,155
Members
403,126
Latest member
Gazali

This Week's Hot Topics

Top