0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Excel】選択している画像を整形する

Posted at
Sub 選択している画像を整形する()

    If VarType(ActiveWindow.Selection) = vbObject Then
        Set tgtShapes = ActiveWindow.Selection.ShapeRange
        For Each shp In tgtShapes
            shp.LockAspectRatio = True   '縦横の比率を固定
            shp.Height = 400             '高さを設定
        Next shp
    Else
        MsgBox "画像が選択されていません。", vbCritical
    End If

End Sub

使用例

対象の画像を選択後、当マクロを実行する。
マニュアルやエビデンス作成時の画面サイズを統一させる必要があるときに利用できる。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?