Enlever des fonctions excel pour un classeur donné ...
5 réponses
kalinaja
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel
et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub
Workbook_Open()
Application.CommandBars(1).Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
End Sub
cela à l'air d'être exactement ce que je cherche ...mais ...
Savez vous ou je pêux trouver la référence exacte à passer en false qui
renvoie aux commandes afficher masquer ?
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
F
Lance l'enregistreur et lance la procédure "manuellement" puis récupère le code qui t'intéresse. J'utile souvent cette méthode. En espérant t'avoir mis sur la voie ;o)
kalinaja a écrit:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
Lance l'enregistreur et lance la procédure "manuellement" puis récupère
le code qui t'intéresse.
J'utile souvent cette méthode.
En espérant t'avoir mis sur la voie ;o)
kalinaja a écrit:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel
et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub
Workbook_Open()
Application.CommandBars(1).Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
End Sub
cela à l'air d'être exactement ce que je cherche ...mais ...
Savez vous ou je pêux trouver la référence exacte à passer en false qui
renvoie aux commandes afficher masquer ?
Lance l'enregistreur et lance la procédure "manuellement" puis récupère le code qui t'intéresse. J'utile souvent cette méthode. En espérant t'avoir mis sur la voie ;o)
kalinaja a écrit:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
kalinaja
merci ! euh et bien à vrai dire je n'arrive pas à y accéder manuellement alors ...je sèche ... mais ne désespère pas ... ;+)
"" wrote:
Lance l'enregistreur et lance la procédure "manuellement" puis récupère le code qui t'intéresse. J'utile souvent cette méthode. En espérant t'avoir mis sur la voie ;o)
kalinaja a écrit:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
merci !
euh et bien à vrai dire je n'arrive pas à y accéder manuellement alors ...je
sèche ...
mais ne désespère pas ... ;+)
"F@brice" wrote:
Lance l'enregistreur et lance la procédure "manuellement" puis récupère
le code qui t'intéresse.
J'utile souvent cette méthode.
En espérant t'avoir mis sur la voie ;o)
kalinaja a écrit:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel
et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub
Workbook_Open()
Application.CommandBars(1).Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
End Sub
cela à l'air d'être exactement ce que je cherche ...mais ...
Savez vous ou je pêux trouver la référence exacte à passer en false qui
renvoie aux commandes afficher masquer ?
merci ! euh et bien à vrai dire je n'arrive pas à y accéder manuellement alors ...je sèche ... mais ne désespère pas ... ;+)
"" wrote:
Lance l'enregistreur et lance la procédure "manuellement" puis récupère le code qui t'intéresse. J'utile souvent cette méthode. En espérant t'avoir mis sur la voie ;o)
kalinaja a écrit:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
papou
Bonjour Il y a deux menus qui proposent Afficher Masquer, à toi de choisir : 1°) Format Feuille CommandBars.FindControl(, 891).Enabled = False 'Afficher CommandBars.FindControl(, 890).Enabled = False 'Masquer
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
Bonjour
Il y a deux menus qui proposent Afficher Masquer, à toi de choisir :
1°) Format Feuille
CommandBars.FindControl(, 891).Enabled = False 'Afficher
CommandBars.FindControl(, 890).Enabled = False 'Masquer
"kalinaja" <kalinaja@discussions.microsoft.com> a écrit dans le message de
news: F87346D4-6275-472B-A45B-666357A4EBCC@microsoft.com...
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel
et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub
Workbook_Open()
Application.CommandBars(1).Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
End Sub
cela à l'air d'être exactement ce que je cherche ...mais ...
Savez vous ou je pêux trouver la référence exacte à passer en false qui
renvoie aux commandes afficher masquer ?
Bonjour Il y a deux menus qui proposent Afficher Masquer, à toi de choisir : 1°) Format Feuille CommandBars.FindControl(, 891).Enabled = False 'Afficher CommandBars.FindControl(, 890).Enabled = False 'Masquer
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
ChrisV
Bonjour kalinaja,
Dans la feuille de code de ThisWorkbook... (pour Excel 2003)
Private Sub Workbook_Activate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = False .CommandBars("Toolbar List").Enabled = False End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = False End If Next cbar End Sub
Private Sub Workbook_Deactivate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = False .CommandBars("Toolbar List").Enabled = False End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = False End If Next cbar End Sub
ChrisV
"kalinaja" a écrit dans le message de news:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
Bonjour kalinaja,
Dans la feuille de code de ThisWorkbook...
(pour Excel 2003)
Private Sub Workbook_Activate()
With Application
.CommandBars(1).Controls(5) _
.Controls(2).Controls(3).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(2).Controls(4).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(3).Controls(3).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(3).Controls(4).Enabled = False
.CommandBars("Toolbar List").Enabled = False
End With
For Each cbar In Application.CommandBars
If cbar.Type = msoBarTypePopup Then
cbar.Enabled = False
End If
Next cbar
End Sub
Private Sub Workbook_Deactivate()
With Application
.CommandBars(1).Controls(5) _
.Controls(2).Controls(3).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(2).Controls(4).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(3).Controls(3).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(3).Controls(4).Enabled = False
.CommandBars("Toolbar List").Enabled = False
End With
For Each cbar In Application.CommandBars
If cbar.Type = msoBarTypePopup Then
cbar.Enabled = False
End If
Next cbar
End Sub
ChrisV
"kalinaja" <kalinaja@discussions.microsoft.com> a écrit dans le message de
news: F87346D4-6275-472B-A45B-666357A4EBCC@microsoft.com...
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel
et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub
Workbook_Open()
Application.CommandBars(1).Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
End Sub
cela à l'air d'être exactement ce que je cherche ...mais ...
Savez vous ou je pêux trouver la référence exacte à passer en false qui
renvoie aux commandes afficher masquer ?
Dans la feuille de code de ThisWorkbook... (pour Excel 2003)
Private Sub Workbook_Activate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = False .CommandBars("Toolbar List").Enabled = False End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = False End If Next cbar End Sub
Private Sub Workbook_Deactivate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = False .CommandBars("Toolbar List").Enabled = False End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = False End If Next cbar End Sub
ChrisV
"kalinaja" a écrit dans le message de news:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
ChrisV
Bonjour kalinaja,
Dans la feuille de code de ThisWorkbook... (pour Excel 2003)
Private Sub Workbook_Activate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = False .CommandBars("Toolbar List").Enabled = False End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = False End If Next cbar End Sub
Private Sub Workbook_Deactivate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = True .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = True .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = True .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = True .CommandBars("Toolbar List").Enabled = True End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = True End If Next cbar End Sub
ChrisV
"kalinaja" a écrit dans le message de news:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?
En vous remerciant,
FF
Bonjour kalinaja,
Dans la feuille de code de ThisWorkbook...
(pour Excel 2003)
Private Sub Workbook_Activate()
With Application
.CommandBars(1).Controls(5) _
.Controls(2).Controls(3).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(2).Controls(4).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(3).Controls(3).Enabled = False
.CommandBars(1).Controls(5) _
.Controls(3).Controls(4).Enabled = False
.CommandBars("Toolbar List").Enabled = False
End With
For Each cbar In Application.CommandBars
If cbar.Type = msoBarTypePopup Then
cbar.Enabled = False
End If
Next cbar
End Sub
Private Sub Workbook_Deactivate()
With Application
.CommandBars(1).Controls(5) _
.Controls(2).Controls(3).Enabled = True
.CommandBars(1).Controls(5) _
.Controls(2).Controls(4).Enabled = True
.CommandBars(1).Controls(5) _
.Controls(3).Controls(3).Enabled = True
.CommandBars(1).Controls(5) _
.Controls(3).Controls(4).Enabled = True
.CommandBars("Toolbar List").Enabled = True
End With
For Each cbar In Application.CommandBars
If cbar.Type = msoBarTypePopup Then
cbar.Enabled = True
End If
Next cbar
End Sub
ChrisV
"kalinaja" <kalinaja@discussions.microsoft.com> a écrit dans le message de
news: F87346D4-6275-472B-A45B-666357A4EBCC@microsoft.com...
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel
et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub
Workbook_Open()
Application.CommandBars(1).Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
End Sub
cela à l'air d'être exactement ce que je cherche ...mais ...
Savez vous ou je pêux trouver la référence exacte à passer en false qui
renvoie aux commandes afficher masquer ?
Dans la feuille de code de ThisWorkbook... (pour Excel 2003)
Private Sub Workbook_Activate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = False .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = False .CommandBars("Toolbar List").Enabled = False End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = False End If Next cbar End Sub
Private Sub Workbook_Deactivate() With Application .CommandBars(1).Controls(5) _ .Controls(2).Controls(3).Enabled = True .CommandBars(1).Controls(5) _ .Controls(2).Controls(4).Enabled = True .CommandBars(1).Controls(5) _ .Controls(3).Controls(3).Enabled = True .CommandBars(1).Controls(5) _ .Controls(3).Controls(4).Enabled = True .CommandBars("Toolbar List").Enabled = True End With For Each cbar In Application.CommandBars If cbar.Type = msoBarTypePopup Then cbar.Enabled = True End If Next cbar End Sub
ChrisV
"kalinaja" a écrit dans le message de news:
Bonjour,
Je cherche à empêcher l'accès aux fonctions afficher masquer du menu excel et clic droit,
J'ai trouvé le code suivant sur excelabo :
Private Sub Workbook_Open() Application.CommandBars(1).Enabled = False End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars(1).Enabled = True End Sub
cela à l'air d'être exactement ce que je cherche ...mais ... Savez vous ou je pêux trouver la référence exacte à passer en false qui renvoie aux commandes afficher masquer ?