Bonjour,
Je souhaite protéger un classeur de façon spécifique.
J'ai juste besoin d'empêcher les utilisateurs certaines fonctionalités des menus (les autres doivent rester Enable)
J'y suis presque, seuls quelques menus me résistent.
Pouvez vous m'aider pour les 3 derniers ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 Private Sub DisableButton() 'Delete Application.CommandBars.FindControl(ID:=292).Enabled = False 'RightClick Delete Application.CommandBars.FindControl(ID:=293).Enabled = False 'RightClick Delete Application.CommandBars.FindControl(ID:=294).Enabled = False 'RightClick Delete Application.CommandBars.FindControl(ID:=478).Enabled = False 'Menu ->Edit ->Delete Application.CommandBars.FindControl(ID:=847).Enabled = False 'Sheet -> RightClick -> Delete '??Application.CommandBars.FindControl(ID:=??).Enabled = False 'Menu ->Edit ->Delete Sheet ' Insert Column & Cells Application.CommandBars.FindControl(ID:=297).Enabled = False 'Menu ->Insert ->Column Application.CommandBars.FindControl(ID:=295).Enabled = False 'Menu ->Insert ->Cells '??Application.CommandBars.FindControl(ID:=??).Enabled = False 'RightClick ->Insert 'Rename Sheet Application.CommandBars.FindControl(ID:=889).Enabled = False 'RightClick Rename Sheet '??Application.CommandBars.FindControl(ID:=??).Enabled = False 'Menu -> Format ->Rename Sheet 'Other Application.CommandBars.FindControl(ID:=402).Enabled = False 'Merge menu icon End Sub
J'ai trouvé les ID existant dans le fichier joint, on ne sait jamais s'il est juste ...
Pour info :
la fonction "protect" est trop "protectrice" pour mon besoin.
J'ai lu le tuto de Fring, peut-être que la liste des ID des menus pourrait être ajoutée (il y a déjà celle des icônes)
Merci d'avance
** Version Excel 2000
Partager