Excel ブックの不要な名前定義・スタイル定義を削除するマクロ
' 不要な名前を削除 | |
Sub DeleteNames() | |
On Error Resume Next | |
Dim n | |
For Each n In ActiveWorkbook.Names | |
If InStr(n.Name, "Print_Area") = 0 And InStr(n.Name, "Print_Titles") = 0 And Not n.BuiltIn Then | |
n.Delete | |
End If | |
Next | |
End Sub | |
' 不要なスタイルを削除 | |
Sub DeleteStyles() | |
On Error Resume Next | |
Dim s | |
For Each s In ActiveWorkbook.Styles | |
If Not s.BuiltIn Then | |
s.Delete | |
End If | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
http://neos21.hatenablog.com/entry/2017/04/04/001903