Excel Tipsメニューに戻る

msoShape24pointStar オートシェイプをVBAで作成

24の星型ができます。


Excel VBA コード

Sub ExMakeShape()
    Dim tshape As Shape
    
    With ActiveSheet.Range("D14:E20")
Set tshape = ActiveSheet.Shapes.AddShape(Type:=msoShape24pointStar, _
Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
        tshape.Name = "シェイプmsoShape24pointStar"
    End With
    Set tshape = Nothing
End Sub

Private Sub CommandButton2_Click()
    ExMakeShape
End Sub



Excel実行画面

星型シェイプ


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


Copyright (c) Excel-Excel ! All rights reserved