Sub SelectNonVer()
Set champ = Nothing
For Each c In ActiveSheet.UsedRange
If Not c.Locked Then
If champ Is Nothing Then
Set champ = c
Else
Set champ = Union(champ, c)
End If
End If
Next c
champ.Select
End Sub
Sub auto_open()
On Error Resume Next
CommandBars("BarreVer").Delete
Dim barre As CommandBar
Dim bouton As CommandBarControl
Set barre = CommandBars.Add(Name:="BarreVer")
barre.Visible = True
Set bouton = CommandBars("BarreVer").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "SelectNonVer"
bouton.Caption = "Selection cellules non verrouillées"
End Sub