DisplayHeadings
The code you are using is not worksheet specific. That is, the settings are
part of the Windows attributes and will apply to everything in the workbook.
You don't even need to loop through the sheets. The following will set the
attributes for the current instance of Excel for whichever workbooks you open
until you reset them.
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = True
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
.CommandBars("Drawing").Visible = True
End With
ActiveWindow.DisplayHeadings = True
"Sandy" wrote:
I have the following which loops through 19 Worksheets :-
For Each Wksht In Worksheets
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = True
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
.CommandBars("Drawing").Visible = True
End With
Next
For Each Wksht In Worksheets
Wksht.Activate
ActiveWindow.DisplayHeadings = True
Next
however I only require it to loop through 7 sheets - say sheets "A" thro
"G". How can I change the above to do that?
Thanks
Sandy
|