Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.73 KB

Excel.PictureFormat.IncrementBrightness.md

File metadata and controls

53 lines (33 loc) · 1.73 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PictureFormat.IncrementBrightness method (Excel)
vbaxl10.chm113020
vbaxl10.chm113020
Excel.PictureFormat.IncrementBrightness
3f75ff17-6cd6-e397-468c-6bf0d1307578
05/03/2019
medium

PictureFormat.IncrementBrightness method (Excel)

Changes the brightness of the picture by the specified amount. Use the Brightness property to set the absolute brightness of the picture.

Syntax

expression.IncrementBrightness (Increment)

expression A variable that represents a PictureFormat object.

Parameters

Name Required/Optional Data type Description
Increment Required Single Specifies how much to change the value of the Brightness property for the picture. A positive value makes the picture brighter; a negative value makes the picture darker.

Remarks

You cannot adjust the brightness of a picture past the upper or lower limit for the Brightness property. For example, if the Brightness property is initially set to 0.9 and you specify 0.3 for the Increment argument, the resulting brightness level will be 1.0, which is the upper limit for the Brightness property, instead of 1.2.

Example

This example creates a duplicate of shape one on myDocument, and then moves and darkens the duplicate. For the example to work, shape one must be either a picture or an OLE object.

Set myDocument = Worksheets(1) 
With myDocument.Shapes(1).Duplicate 
 .PictureFormat.IncrementBrightness -0.2 
 .IncrementLeft 50 
 .IncrementTop 50 
End With

[!includeSupport and feedback]