Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Sheet change code

Hi.

I'm using excel 2003. When I open my workbook I have an auto_open routine
that strips out all excel features such as row and column headings etc.
However, Excel seems to have a mind of its own and when I click on sheet tabs
to change sheet I see that the row and heading columns have reapered. Is
there any code out there that will strip out what I want just by clicking the
sheet tab.

Thanks in advance.

Gordon
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Sheet change code

Row and column headings is a window setting, not a application level setting.
That means that you need to set it for each window as you go there. Place
this code in Thisworkbook and you should be good to go...

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ActiveWindow.DisplayHeadings = False
End Sub

--
HTH...

Jim Thomlinson


"Gordon" wrote:

Hi.

I'm using excel 2003. When I open my workbook I have an auto_open routine
that strips out all excel features such as row and column headings etc.
However, Excel seems to have a mind of its own and when I click on sheet tabs
to change sheet I see that the row and heading columns have reapered. Is
there any code out there that will strip out what I want just by clicking the
sheet tab.

Thanks in advance.

Gordon

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Sheet change code

Hi Gordon,

How about something like this...

Private Sub Workbook_Open()
Dim wks As Worksheet

For Each wks In ThisWorkbook.Worksheets
If wks.Visible Then
wks.Activate
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
End If
Next wks
End Sub

HTH,
NickH

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
Code Conflicts With Worksheet Change Code Paige Excel Programming 3 March 3rd 06 04:25 PM
Worksheet_Selection Change code will not allow cell contents to be copied and pasted onto the sheet it's running on KimberlyC Excel Programming 1 July 8th 05 02:51 AM
Change Listbox Sheet reorder code Stuart[_21_] Excel Programming 3 May 2nd 05 07:26 AM
Sheet Code Module: copying code to [email protected][_2_] Excel Programming 2 December 14th 04 01:57 AM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


All times are GMT +1. The time now is 06:39 AM.

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

About Us

"It's about Microsoft Excel"