Skip to main content

Interior.TintAndShade property

Table of contents
  1. Syntax
  2. Remarks
  3. Examples

Returns or sets a Single that lightens or darkens a color.

Syntax

expression.TintAndShade

expression A variable that represents an Interior object.

Remarks

You can enter a number from -1 (darkest) to 1 (lightest) for the TintAndShade property. Zero (0) is neutral.

Attempting to set this property to a value less than -1 or more than 1 results in a run-time error: "The specified value is out of range." This property works for both theme colors and nontheme colors.

Examples

The following example sets the background color for Range G2:G5.

With Range("G2:G5").Interior
    .ThemeColor = xlThemeColorDark1
    .TintAndShade = -0.25
End With

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>