C
CacheIndex Property
CalculateBeforeSave Property
CalculatedMembers Property
Calculation Property
CalculationInterruptKey Property
CalculationState Property
CalculationVersion Property
Caller Property
Callout Property
CanPlaySounds Property
CanRecordSounds Property
CapitalizeNamesOfDays Property
Caption Property
Category Property
CategoryLocal Property
CategoryNames Property
CategoryType Property
CCRecipients Property
CellDragAndDrop Property
Cells Property
CenterFooter Property
CenterFooterPicture Property
CenterHeader Property
CenterHeaderPicture Property
CenterHorizontally Property
CenterVertically Property
ChangeHistoryDuration Property
ChangingCells Property
Characters Property
CharacterType Property
Chart Property
ChartArea Property
Charts Property
ChartSize Property
ChartTitle Property
Expand Minimize
This topic has not yet been rated - Rate this topic

CropBottom Property [Excel 2003 VBA Language Reference]

Office 2003

Returns or sets the number of points that are cropped off the bottom of the specified picture or OLE object. Read/write Single.

expression.CropBottom

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

Cropping is calculated relative to the original size of the picture. For example, if you insert a picture that is originally 100 points high, rescale it so that it's 200 points high, and then set the CropBottom property to 50, 100 points (not 50) will be cropped off the bottom of your picture.

Example

This example crops 20 points off the bottom of shape three on myDocument. For the example to work, shape three must be either a picture or an OLE object.

Set myDocument = Worksheets(1)
myDocument.Shapes(3).PictureFormat.CropBottom = 20
		

Using this example, you can specify the percentage you want to crop off the bottom of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.

percentToCrop = InputBox( _
    "What percentage do you want to crop off" & _
    " the bottom of this picture?")
Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)
With shapeToCrop.Duplicate
    .ScaleHeight 1, True
    origHeight = .Height
    .Delete
End With
cropPoints = origHeight * percentToCrop / 100
shapeToCrop.PictureFormat.CropBottom = cropPoints
		




Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.