Class FillFormat (Excel VBA)
The class FillFormat represents fill formatting for a shape.
Methods
Other Methods
OneColorGradient - Sets the specified fill to a one-color gradient.
PresetGradient - Sets the specified fill to a preset gradient.
TwoColorGradient - Sets the specified fill to a two-color gradient.
Properties
BackColor returns or sets a ColorFormat object that represents the specified fill background color.
ForeColor returns or sets a ColorFormat object that represents the specified foreground fill or solid color.
GradientAngle returns or sets the angle of the gradient fill for the specified fill format.
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Format.Fill.GradientAngle = 45
GradientColorType returns the gradient color type for the specified fill.
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillGradient And _
c1f.GradientColorType = msoGradientOneColor Then
With Charts(2).ChartArea.Fill
.Visible = True
.OneColorGradient c1f.GradientStyle, _
c1f.GradientVariant, c1f.GradientDegree
End With
End If
GradientDegree returns the gradient degree of the specified one-color shaded fill as a floating-point value from 0.0 (dark) through 1.0 (light).
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillGradient And _
c1f.GradientColorType = msoGradientOneColor Then
With Charts(2).ChartArea.Fill
.Visible = True
.OneColorGradient c1f.GradientStyle, _
c1f.GradientVariant, c1f.GradientDegree
End With
End If
GradientStops returns the end point for the gradient fill.
GradientStyle returns the gradient style for the specified fill.
GradientVariant returns the shade variant for the specified fill as an integer value from 1 through 4. The values for this property correspond to the gradient variants (numbered from left to right and from top to bottom) on the Gradient tab in the Fill Effects dialog box.
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillGradient And _
c1f.GradientColorType = msoGradientOneColor Then
With Charts(2).ChartArea.Fill
.Visible = True
.OneColorGradient c1f.GradientStyle, _
c1f.GradientVariant, c1f.GradientDegree
End With
End If
Parent returns the parent object for the specified object. Read-only.
Pattern returns or sets an MsoPatternType value that represents the fill pattern.
PictureEffects returns a PictureEffects object that represents the picture or texture fill for the specified fill format.
PresetGradientType returns the preset gradient type for the specified fill.
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillGradient Then
With Charts(2).ChartArea.Fill
.Visible = True
.PresetGradient c1f.GradientStyle, _
c1f.GradientVariant, c1f.PresetGradientType
End With
End If
PresetTexture returns the preset texture for the specified fill.
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillTextured Then
With Charts(2).ChartArea.Fill
.Visible = True
If c1f.TextureType = msoTexturePreset Then
.PresetTextured c1f.PresetTexture
Else
.UserTextured c1f.TextureName
End If
End With
End If
RotateWithObject returns or sets if the fill style should rotate with the object.
TextureAlignment returns or sets the alignment (the origin of the coordinate grid) for the tiling of the texture fill.
TextureHorizontalScale returns or sets the horizontal scaling factor for the texture fill.
TextureName returns the name of the custom texture file for the specified fill.
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillTextured Then
With Charts(2).ChartArea.Fill
.Visible = True
If c1f.TextureType = msoTexturePreset Then
.PresetTextured c1f.PresetTexture
Else
.UserTextured c1f.TextureName
End If
End With
End If
TextureOffsetX returns the offset X value for the specified fill.
TextureOffsetY returns the offset Y value for the specified fill.
TextureTile returns the texture tile style for the specified fill.
TextureType returns the texture type for the specified fill.
Set c1f = Charts(1).ChartArea.Fill
If c1f.Type = msoFillTextured Then
With Charts(2).ChartArea.Fill
.Visible = True
If c1f.TextureType = msoTexturePreset Then
.PresetTextured c1f.PresetTexture
Else
.UserTextured c1f.TextureName
End If
End With
End If
TextureVerticalScale returns the texture vertical scale for the specified fill.
Transparency returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).
Type returns an MsoFillType value that represents the fill type.
Visible returns or sets an MsoTriState value that determines whether the object is visible.