Private Sub Workbook_Open()
Application.ScreenUpdating = False
chemin = "C:\Documents and Settings\" & Environ("username") & "\Desktop\"
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
Dim cbar As CommandBar
For Each cbar In Application.CommandBars 'pour chaque barre de l'application
cbar.Enabled = False 'inactivation de la barre
Next
Application.CommandBars("Chewi").Enabled = True
Application.ScreenUpdating = True
'activation barre d'outils personnalisée
Load UfMotDePasse
UfMotDePasse.Show
With Sheets(1)
.Unprotect password:="fauxpass"
.Cells.Locked = True
.Protect password:="fauxpass", DrawingObjects:=True, Contents:=True, Scenarios:=True
.EnableSelection = xlUnlockedCells
End With
End Sub