Created
June 14, 2016 13:11
-
-
Save icm7216/2035414375262f583db53fd25917ceb8 to your computer and use it in GitHub Desktop.
Excelワークブックに登録されたスタイルを数えるマクロ。
This file contains 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 count_workbook_styles() | |
On Error Resume Next | |
Dim bltin_count As Long | |
Dim not_bltin_count As Long | |
Dim s As Style | |
Dim bk As Workbook | |
Set bk = ActiveWorkbook | |
bltin_count = 0 | |
not_bltin_count = 0 | |
For Each s In bk.Styles | |
If s.BuiltIn Then | |
bltin_count = bltin_count + 1 | |
Else | |
not_bltin_count = not_bltin_count + 1 | |
End If | |
Next | |
Debug.Print "Builtin= " & bltin_count & ", NotBuiltin= " & not_bltin_count | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment