msoShape4pointStar オートシェイプをVBAで作成
4個の角の星型ができます。
Excel Tipsメニューに戻る
Excel VBA コード
Sub ExMakeShape()
Dim tshape As Shape
With ActiveSheet.Range("D14:E20")
Set tshape = ActiveSheet.Shapes.AddShape(Type:=msoShape4pointStar, _
Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
tshape.Name = "シェイプmsoShape4pointStar"
End With
Set tshape = Nothing
End Sub
Private Sub CommandButton2_Click()
ExMakeShape
End Sub
Excel実行画面

■■■
このサイトの内容を利用して発生した、いかなる問題にも一切責任は負いませんのでご了承下さい
■■■
当ホームページに掲載されているあらゆる内容の無許可転載・転用を禁止します
Copyright (c) Excel-Excel ! All rights reserved