Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Help with - J.Walkenbachs code

Hi all, I got the code from J. Walkenbachs book and it works great, but
it does not hide the menu bar, could somebody tell my how i would modify
it to hide the menu bar as well ??

---------------------------------------------------------------------
Sub HideAllToolbars()
Dim TB As CommandBar
Dim TBNum As Integer
Dim TBSheet As Worksheet
Set TBSheet = Workbooks("Recon_Master.xls").Worksheets("TBSheet" )
Application.ScreenUpdating = False
' clear the sheet
TBSheet.Cells.Clear
'Hide all visable toolbars and store their names
TBNum = 0
For Each TB In CommandBars
If TB.Type = msoBarTypeNormal Then
If TB.Visible Then
TBNum = TBNum + 1
TB.Visible = False
TBSheet.Cells(TBNum, 1) = TB.Name
End If
End If
Next TB
Application.ScreenUpdating = True
addToolbar
End Sub
------------------------------------------------------------------------
-
Sub restoreToolbars()
Dim TBSheet As Worksheet
Dim cell As Range
Set TBSheet =
Workbooks("Recon_Master.xls").Worksheets("TBSheet" )
Application.ScreenUpdating = False
'unhide the previousely displayed toolbars
On Error Resume Next
For Each cell In TBSheet.Range("A:A") _
.SpecialCells(xlCellTypeConstants)
CommandBars(cell.Value).Visible = True
Next cell
Application.ScreenUpdating = True
End Sub


Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help with - J.Walkenbachs code

application.Commandbars("Worksheet Menu Bar").Enabled = False

--
Regards,
Tom Ogilvy

"Tempy" wrote in message
...
Hi all, I got the code from J. Walkenbachs book and it works great, but
it does not hide the menu bar, could somebody tell my how i would modify
it to hide the menu bar as well ??

---------------------------------------------------------------------
Sub HideAllToolbars()
Dim TB As CommandBar
Dim TBNum As Integer
Dim TBSheet As Worksheet
Set TBSheet = Workbooks("Recon_Master.xls").Worksheets("TBSheet" )
Application.ScreenUpdating = False
' clear the sheet
TBSheet.Cells.Clear
'Hide all visable toolbars and store their names
TBNum = 0
For Each TB In CommandBars
If TB.Type = msoBarTypeNormal Then
If TB.Visible Then
TBNum = TBNum + 1
TB.Visible = False
TBSheet.Cells(TBNum, 1) = TB.Name
End If
End If
Next TB
Application.ScreenUpdating = True
addToolbar
End Sub
------------------------------------------------------------------------
-
Sub restoreToolbars()
Dim TBSheet As Worksheet
Dim cell As Range
Set TBSheet =
Workbooks("Recon_Master.xls").Worksheets("TBSheet" )
Application.ScreenUpdating = False
'unhide the previousely displayed toolbars
On Error Resume Next
For Each cell In TBSheet.Range("A:A") _
.SpecialCells(xlCellTypeConstants)
CommandBars(cell.Value).Visible = True
Next cell
Application.ScreenUpdating = True
End Sub


Tempy

*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Help with - J.Walkenbachs code

Thanks Tom.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
run code on opening workbook and apply code to certain sheets Jane Excel Programming 7 August 8th 05 09:15 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
Chart question - Walkenbachs book Steve P[_4_] Excel Programming 4 August 18th 04 01:14 PM


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