Редагувати

Поділитися через


FillFormat.GradientAngle property (Excel)

Returns or sets the angle of the gradient fill for the specified fill format. Read/write.

Syntax

expression.GradientAngle

expression A variable that represents a FillFormat object.

Return value

Single

Remarks

A gradient fill can be specified in the formatting for various elements (shapes) in a chart. For example, you can use the Format Data Series dialog box to format the columns in a Column chart to a gradient fill. In this case, the GradientAngle property corresponds to the setting of the Angle box in the Fill category of the Format Data Series dialog box. The valid range of values for the GradientAngle property is from 0 to 359.9.

Example

The following code example sets the angle of the gradient fill for Series 1 in Chart 1 to 45 degrees.

ActiveSheet.ChartObjects("Chart 1").Activate 
ActiveChart.SeriesCollection(1).Format.Fill.GradientAngle = 45

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.