Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Excel スタイル 一括削除 VBA

Last updated at Posted at 2020-05-01
Sub delstyle()
  Dim s
  Dim count As Long
  Dim styeles As Long
  count = 0
  styleCount = ActiveWorkbook.Styles.count
  For Each s In ActiveWorkbook.Styles
    If Not s.BuiltIn Then
      s.Delete
      count = count + 1
      If count Mod 100 = 0 Then
        Application.ScreenUpdating = True
        Application.StatusBar = count & "/" & styleCount & "個目の処理中"
        Application.ScreenUpdating = False
      End If
    End If
  Next
  Application.ScreenUpdating = True
  Application.StatusBar = "完了"
End Sub
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?