Excel VBA 質問スレ Part45 [無断転載禁止]©5ch.io
■ このスレッドは過去ログ倉庫に格納されています
0499デフォルトの名無しさん
2017/02/04(土) 15:59:29.14ID:4MwsZCTu一つ目の画像を縦横の短い長さでクロップしたいのですが
どこがまちがっているのでしょうか
Sub 画像をクロップして正方形にしたい()
Dim myPic As Shape
Set myPic = ActiveSheet.Shapes(1)
With myPic
TateYokoSa = Abs(.Height - .Width)
If .Height > .Width Then
.PictureFormat.CropBottom = .PictureFormat.CropBottom + TateYokoSa
Else
.PictureFormat.CropRight = .PictureFormat.CropRight + TateYokoSa
End If
End With
End Sub
■ このスレッドは過去ログ倉庫に格納されています