LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default workbooks keep hiding

how do you stop all the inactive workbooks from hiding I was using this
code to hide everything and now whenever I have two or more workbooks
open only the active one shows
I have the same code for workbook deactivate and activate

Private Sub Workbook_Open()
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

End With
Dim TBarCount As Integer
Dim cbar As CommandBar
Sheets("sheet1").Range("A:A").ClearContents
TBarCount = 0
For Each cbar In Application.CommandBars
If cbar.Type = msoBarTypeNormal Then
If cbar.Visible Then
TBarCount = TBarCount + 1
Sheets("sheet1").Cells(TBarCount, 1) = cbar.Name
cbar.Visible = False
End If
End If
Next cbar
Sheets("Information").Select
Range("A3").Select
ActiveWindow.Zoom = 95

End Sub
Private Sub Workbook_Activate()
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

End With
Dim TBarCount As Integer
Dim cbar As CommandBar
Sheets("sheet1").Range("A:A").ClearContents
TBarCount = 0
For Each cbar In Application.CommandBars
If cbar.Type = msoBarTypeNormal Then
If cbar.Visible Then
TBarCount = TBarCount + 1
Sheets("sheet1").Cells(TBarCount, 1) = cbar.Name
cbar.Visible = False
End If
End If
Next cbar
Sheets("Information").Select
Range("A3").Select
ActiveWindow.Zoom = 95

End Sub

 
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
Linking Groups of cells between workbooks vnacj-joe Excel Discussion (Misc queries) 4 June 14th 07 05:18 PM
Links auto update on some workbooks but not others Tasza Excel Worksheet Functions 1 October 25th 05 01:04 AM
Consolidate different sheets to different workbooks markx Excel Worksheet Functions 3 April 26th 05 03:30 PM
Linking Workbooks Dede McEachern Excel Worksheet Functions 0 January 21st 05 08:27 PM
Workbooks...I'll try this again... Markster Excel Discussion (Misc queries) 10 December 7th 04 10:12 PM


All times are GMT +1. The time now is 10:18 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"