Bonsoir
Modifie la macro
Sub ouvrir_feuil()
Dim feuilles, f%
feuilles = Split("base;nouvelle ref;recherche emp;recherche ref;acceuil", ";")
On Error GoTo errfeuil
f = CInt(Right(Application.Caller, 1))
Select Case f
Case 1 To 5
Application.ScreenUpdating = False
If f = 5 Then
ActiveSheet.Visible = False
Sheets("nouvelle ref").Range("B8,D8,F8,H8").ClearContents
With Sheets("recherche emp")
.Unprotect
.SpinButton1.Visible = False
.Range("D12,F12,H12,J12,E17").ClearContents
.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
End With
Sheets("recherche ref").Range("D12,F12,H12").ClearContents
End If
With Worksheets(feuilles(f))
.Visible = True
.Activate
End With
Application.ScreenUpdating = True
Case Else
Exit Sub
End Select
errfeuil:
'ActiveWorkbook.Save 'enregistre en quittant la feuil
End Sub