Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOCK TOOLBARS IN PLACE??

Status
Not open for further replies.

ssecca

Programmer
Feb 13, 2002
219
US
I am using Office 2002 and wnat to lock my toolbars in place. Is there a way that anybody knows to do that. I will except just locking Word if that is possible but would like to lock them all globally if possible.

Thanks Much
ssecca
 
You can run this code from a workbook / document's Open event:
Code:
Sub LockDown()
    Dim cmdBar As CommandBar
    For Each cmdBar In Application.CommandBars
    If cmdBar.Visible = True Then
       '(I don't think it can be changed unless visible)
       cmdBar.Protection = msoBarNoMove or msoBarNoChangeVisible
    End If
    Next
End Sub
Valid CommandBar settings:
Code:
msoBarNoChangeDock
msoBarNoChangeVisible
msoBarNoCustomize
msoBarNoHorizontalDock
msoBarNoMove
msoBarNoProtection
msoBarNoResize
msoBarNoVerticalDock

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top