Sub WorksheetLoop()
Dim WS_Count As Long
Dim I As Long
' Set WS_Count equal to the number of worksheets in the active
' workbook.
WS_Count = ActiveWorkbook.Worksheets.Count
' Begin the loop.
For I = 1 To WS_Count
ActiveWorkbook.Worksheets(I).Cells.RemoveSubtotal
Next I
End Sub
Sub WorksheetLoop1()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Cells.RemoveSubtotal
Next ws
End Sub
Sub WorksheetLoop2()
dim ws as worksheet
For Each ws In Worksheets
' cho o chon va sheet chon
ws.select
ws.Cells.Select
Selection.RemoveSubtotal
Next ws
End Sub