Help with - J.Walkenbachs code

T

Tempy

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 ***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top