Hide row and column headings in a workbook

Macro Title:
Worksheet Variable:
Row and Column Display Headings Option:
First Comment:

'

Sub Hide_Row_Column_Headings()
Dim ws As Worksheet
'hide row and column headings in a workbook

For Each ws In Worksheets

ws.Activate
ActiveWindow.DisplayHeadings = False
Next ws

End Sub