トップページ(目次)

377.For_eachの使い方②_各図形_Shapes_オブジェクト

<実行前後>
 → 
Sub For_eachの使い方②_各図形_Shapes_オブジェクト()

    For Each オブジェクト In ActiveSheet.Shapes
    
        オブジェクト番号 = オブジェクト.Type
        
        If オブジェクト番号 = 17 _
        Or オブジェクト番号 = 13 _
        Or オブジェクト番号 = 8 _
        Or オブジェクト番号 = 3 Then
            
            オブジェクト.Select
            オブジェクト.Delete
        
        End If
        
    Next

End Sub
<振られている番号一覧> オブジェクト番号 = 17 → テキストボックス オブジェクト番号 = 13 → 画像 オブジェクト番号 = 8 → ボタン オブジェクト番号 = 3 → グラフ

Copyright © 2021 https://excel3000.web.fc2.com/ All Rights Reserved.
    inserted by FC2 system