ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide Row and Column Headings (https://www.excelbanter.com/excel-programming/390055-hide-row-column-headings.html)

Sandy

Hide Row and Column Headings
 
The following hides the Row and Column Headings for the activesheet. How can
it be adjusted to apply to the whole workbook

Sub HideRowAndColHeadings()
Windows("TestBook.xls").DisplayHeadings = False
End Sub

Thanks Sandy



Tom Ogilvy

Hide Row and Column Headings
 
Sub HideRowAndColHeadings()
Dim sh as Worksheet, sh1 as Worksheet
Application.ScreenUpdating = False
set sh1 = Activesheet
for each sh in Workbooks("TestBook.xls").Worksheets
sh.Activate
Windows("TestBook.xls").DisplayHeadings = False
Next
Application.ScreenUpdating = True
sh1.Activate
End Sub

--
Regards,
Tom Ogilvy


"Sandy" wrote:

The following hides the Row and Column Headings for the activesheet. How can
it be adjusted to apply to the whole workbook

Sub HideRowAndColHeadings()
Windows("TestBook.xls").DisplayHeadings = False
End Sub

Thanks Sandy




Sebation.G[_2_]

Hide Row and Column Headings
 
try:
put this code under thisworkbook
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Windows("book1.xlsx").DisplayHeadings = False
End Sub

--
Regards,

Sebation.G
"Sandy" ...
The following hides the Row and Column Headings for the activesheet. How
can it be adjusted to apply to the whole workbook

Sub HideRowAndColHeadings()
Windows("TestBook.xls").DisplayHeadings = False
End Sub

Thanks Sandy




[email protected]

Hide Row and Column Headings
 
Hi
In the ThisWorkBook code module put this

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.Screenupdating = False
HideRowAndColHeadings
End Sub

bit oblique, but it does the job eventually!
Paul


On May 24, 2:36 pm, "Sandy" wrote:
The following hides the Row and Column Headings for the activesheet. How can
it be adjusted to apply to the whole workbook

Sub HideRowAndColHeadings()
Windows("TestBook.xls").DisplayHeadings = False
End Sub

Thanks Sandy





All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com