Created
August 23, 2012 12:29
-
-
Save dck-jp/3436226 to your computer and use it in GitHub Desktop.
ResetAllCommandBars @ VBA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ResetAllCommandBars() | |
Dim objCommandBar As Office.CommandBar | |
For Each objCommandBar In Application.CommandBars | |
If objCommandBar.BuiltIn Then | |
objCommandBar.Reset | |
End If | |
Next | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ResetAllCommandBars() | |
Dim objCommandBar As Office.CommandBar | |
For Each objCommandBar In Application.CommandBars | |
On Error Resume Next 'Reset()で発生するエラーはなかったことに | |
objCommandBar.Reset | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment