Excel上のスクリーンショットした画像の倍率(サイズ)を変えるマクロ
Sub PictureZoomChange()
myZoom = InputBox(prompt:= _
"倍率を入力してください。" & vbLf & _
"75% = 0.75, 100% = 1, 125% = 1.25" _
, Title:="画像縮小拡大", Default:=0.7)
Selection.ShapeRange.ScaleWidth myZoom, msoTrue
Selection.ShapeRange.ScaleHeight myZoom, msoTrue
End Sub
新規Bookでマクロのインポート用
Ctrl + l で動く
ファイル名<ModulePictuture99.bas>で保存して、インポートする。
Attribute VB_Name = "ModulePictuture99"
Sub PictureZoomChange()
Attribute PictureZoomChange.VB_ProcData.VB_Invoke_Func = "l\n14"
myZoom = InputBox(prompt:= _
"倍率を入力してください。" & vbLf & _
"75% = 0.75, 100% = 1, 125% = 1.25" _
, Title:="画像縮小拡大", Default:=0.7)
Selection.ShapeRange.ScaleWidth myZoom, msoTrue
Selection.ShapeRange.ScaleHeight myZoom, msoTrue
End Sub
<参考資料>
Excel VBA実践プログラミング Excel2000/2002対応 単行本 – 2003/5/17
足利谷 毅 (著)
単行本: 549ページ
出版社: 技術評論社 (2003/5/17)
言語: 日本語
ISBN-10: 4774117366
ISBN-13: 978-4774117362
発売日: 2003/5/17
梱包サイズ: 22.8 x 18.4 x 2.8 cm
P-433 9-7-1 画像の拡大/縮小
より