即効テクニック |
サンプルマクロは、アクティヴシート以外のシートを警告なしに削除します。
Sub Sample()
Dim mySht As Worksheet
With Application
.DisplayAlerts = False
For Each mySht In Worksheets
If mySht.Name <> ActiveSheet.Name Then mySht.Delete
Next
.DisplayAlerts = True
End With
End Sub