Toggle Headings for All Worksheets

  • Thread starter Thread starter Rebecca
  • Start date Start date
R

Rebecca

I am using MS Excel 2007. I have a workbook with many worksheets. Sometimes I
need to see the headings, sometimes not. Is it possible to turn on or off the
headings for ALL the worksheets simultaneously. Thanks.
 
Never mind. If I select all sheets by right-clicking on the tabs, then
checking or unchecking headings in Show/Hide, the headings are toggled, so
the problem is solved.

Just curious. Is there another way.
 
Hi Rebecca,
You could paste the following macro into your sheet and give it a
keyboard shortcut or a button. It turns headings of all sheets off if
they're on, and vice versa.

Sub DisplayHeadings()
A = ActiveSheet.Name
Sheets.Select
If ActiveWindow.DisplayHeadings = False Then _
ActiveWindow.DisplayHeadings = True Else _
ActiveWindow.DisplayHeadings = False
Sheets(A).Select
End Sub

Regards - Dave.
 
Back
Top