Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to hide/show row/column headers and sheet tabs.

Hi,

I know how to goto Tools/Options/View to change whether
or not a worksheet displays Row&Column headers, Sheet
tabs, and the Horizontal & Vertical scroll bars, but can
I set these attributes differently for different
worksheets?

Seemingly not in Tools/Options as the result appears
random, ie in worksheet 1, (for instance), if I hide the
row/column headers they are not hidden in worksheets 2
and 3 etc, although if I hide sheet tabs in one
worksheet, they are hidden in all.

I use macros to navigate to different worksheets, and I
need to set or unset these attributes differently,
depending which worksheet is being visited.

If there is a way I assume it will be VBA, but what would
the code be?

Many thanks

Mark Flaxman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default How to hide/show row/column headers and sheet tabs.

Turn on the Macro Recorder and play with the Tools | Options | Window
options

eg.
Sub Macro1()
With ActiveWindow
.DisplayHeadings = False
.DisplayWorkbookTabs = False
End With
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Mark Flaxman" wrote in message
...
Hi,

I know how to goto Tools/Options/View to change whether
or not a worksheet displays Row&Column headers, Sheet
tabs, and the Horizontal & Vertical scroll bars, but can
I set these attributes differently for different
worksheets?

Seemingly not in Tools/Options as the result appears
random, ie in worksheet 1, (for instance), if I hide the
row/column headers they are not hidden in worksheets 2
and 3 etc, although if I hide sheet tabs in one
worksheet, they are hidden in all.

I use macros to navigate to different worksheets, and I
need to set or unset these attributes differently,
depending which worksheet is being visited.

If there is a way I assume it will be VBA, but what would
the code be?

Many thanks

Mark Flaxman



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to hide/show row/column headers and sheet tabs.

Mark

I would place code in the worksheets so that when a particular sheet is
activated, the attributes would be set.

Private Sub Worksheet_Activate()
With ActiveWindow
.DisplayHeadings = True 'change to False in other sheet
.DisplayWorkbookTabs = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With
End Sub

Remember: if sheet tabs are False on a sheet you can use CRTL + PageDown or
PageUp to switch sheets.

Gord Dibben Excel MVP

On Sat, 14 Feb 2004 11:35:36 -0800, "Mark Flaxman"
wrote:

Hi,

I know how to goto Tools/Options/View to change whether
or not a worksheet displays Row&Column headers, Sheet
tabs, and the Horizontal & Vertical scroll bars, but can
I set these attributes differently for different
worksheets?

Seemingly not in Tools/Options as the result appears
random, ie in worksheet 1, (for instance), if I hide the
row/column headers they are not hidden in worksheets 2
and 3 etc, although if I hide sheet tabs in one
worksheet, they are hidden in all.

I use macros to navigate to different worksheets, and I
need to set or unset these attributes differently,
depending which worksheet is being visited.

If there is a way I assume it will be VBA, but what would
the code be?

Many thanks

Mark Flaxman


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to hide/show row/column headers and sheet tabs.


Excellent!

Many thanks Gord and Rob.

Much appreciated.

Mark


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Hide Row & Column Headers in Excel ? Irfan Khan[_2_] Excel Discussion (Misc queries) 3 November 2nd 07 02:44 PM
How do I hide the column and row default headers in Excel? Gina Excel Discussion (Misc queries) 4 May 17th 07 07:40 PM
reference tabs in a summary sheet as column headers JDR Excel Discussion (Misc queries) 6 March 7th 07 06:04 PM
Show/Hide Column and Row Headers graz Excel Discussion (Misc queries) 2 September 29th 05 01:37 AM
Check boxes to show/hide Tabs Sridhar Rao Excel Worksheet Functions 1 January 5th 05 03:28 PM


All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"