ankita.sethi
Board Regular
- Joined
- Apr 27, 2011
- Messages
- 58
Hi,
I am trying to create a macro which removes row and column header on each sheet of the workbook.
This is the code I tried:
Sub Remove_RowHeaders()
'removes row and column heading from each of the sheet
For Each Worksheet In Worksheets
ActiveWindow.DisplayHeadings = False
Next Worksheet
End Sub
However, since it is "activeWindow", it operates only on the active sheet and not on all. Can anyone please tell me how to modify this so that it works??
I am trying to create a macro which removes row and column header on each sheet of the workbook.
This is the code I tried:
Sub Remove_RowHeaders()
'removes row and column heading from each of the sheet
For Each Worksheet In Worksheets
ActiveWindow.DisplayHeadings = False
Next Worksheet
End Sub
However, since it is "activeWindow", it operates only on the active sheet and not on all. Can anyone please tell me how to modify this so that it works??