Skip to content

Instantly share code, notes, and snippets.

@object1985
Last active December 7, 2021 15:11
Show Gist options
  • Save object1985/1fd3182efbe02134b9e0d54c98c5b7b9 to your computer and use it in GitHub Desktop.
Save object1985/1fd3182efbe02134b9e0d54c98c5b7b9 to your computer and use it in GitHub Desktop.
名前定義の取得と削除
Sub deleteNameDefine()
Dim nm As Name
On Error Resume Next
i = 1
For Each nm In ActiveWorkbook.Names
nm.Delete
i = i + 1
Next
On Error GoTo 0
MsgBox "名前定義削除の処理完了。削除対象数:" & i
End Sub
Sub showNameCount()
i = 1
' ブック内の名前の定義で、ループ
For Each a In ActiveWorkbook.Names
i = i + 1
Next
MsgBox i
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment