Toggle Headings for All Worksheets

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.
 
R

Rebecca

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.
 
D

Dave

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top