bonjour thierry
lab s?
voici, r dig il y a fort longtemps pas notre ange actuel et pr f r :
Sub ListeCommandBar()
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
x = x + 1
Range("A" & X) = Mbar.Name
Range("b" & X) = Mbar.ID
On Error Resume Next
Nb = Mbar.Controls.Count
For a = 1 To Nb
Cells(x, a + 2) = Mbar.Controls(a).Caption
Next
Next
End Sub
pour avoir les ID de chacun, tu doit remplacer
Cells(x, a + 2) = Mbar.Controls(a).caption
par
Cells(x, a + 2) = Mbar.Controls(a).ID
valable jusqu' XP sans probl me, je pense
pour au-del , d'autres que moi vont pouvoir te le dire
HTH
Mgr T. P. (de retour des matines)
bonjour thierry
lab s?
voici, r dig il y a fort longtemps pas notre ange actuel et pr f r :
Sub ListeCommandBar()
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
x = x + 1
Range("A" & X) = Mbar.Name
Range("b" & X) = Mbar.ID
On Error Resume Next
Nb = Mbar.Controls.Count
For a = 1 To Nb
Cells(x, a + 2) = Mbar.Controls(a).Caption
Next
Next
End Sub
pour avoir les ID de chacun, tu doit remplacer
Cells(x, a + 2) = Mbar.Controls(a).caption
par
Cells(x, a + 2) = Mbar.Controls(a).ID
valable jusqu' XP sans probl me, je pense
pour au-del , d'autres que moi vont pouvoir te le dire
HTH
Mgr T. P. (de retour des matines)
bonjour thierry
lab s?
voici, r dig il y a fort longtemps pas notre ange actuel et pr f r :
Sub ListeCommandBar()
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
x = x + 1
Range("A" & X) = Mbar.Name
Range("b" & X) = Mbar.ID
On Error Resume Next
Nb = Mbar.Controls.Count
For a = 1 To Nb
Cells(x, a + 2) = Mbar.Controls(a).Caption
Next
Next
End Sub
pour avoir les ID de chacun, tu doit remplacer
Cells(x, a + 2) = Mbar.Controls(a).caption
par
Cells(x, a + 2) = Mbar.Controls(a).ID
valable jusqu' XP sans probl me, je pense
pour au-del , d'autres que moi vont pouvoir te le dire
HTH
Mgr T. P. (de retour des matines)
Bonjour,
Pour ton exemple explicite de la commande dans ta question, tu pourrais u tiliser ceci :
'-------------------------------------
Sub Desactiver_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = False
Next
End Sub
'-------------------------------------
Sub Activer_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = True
Next
End Sub
'------------------------------------
Une proc dure de Laurent Longre pour lister les commandes et leur ID des versions Excel 1997 2003
Dim I As Integer, J As Integer
Sub ListeIDS()
'L Longre
Dim CmdB As CommandBar
I = 1: J = 0
Cells.Clear
Application.ScreenUpdating = False
For Each CmdB In Application.CommandBars
R curse CmdB
Next CmdB
With Range("A1").CurrentRegion
.Font.Size = 8
.EntireColumn.AutoFit
.EntireRow.AutoFit
End With
End Sub
Private Sub R curse(CmdB As Object)
Dim Ctrl As CommandBarControl
J = J + 1
For Each Ctrl In CmdB.Controls
With Cells(I, J)
.Value = Ctrl.Caption & IIf(Ctrl.BuiltIn, " = " & Ctrl.ID , "")
If J = 1 Then .Font.Bold = True
End With
If Ctrl.Type = msoControlPopup Then R curse Ctrl Else I = I + 1
Next Ctrl
J = J - 1
End Sub
Cependant, les exemples pour activer ou d sactiver une commande telle qu' nonc
en d but de fil est disponible que pour certaines commandes pour les vers ions 2007 et 2010.
Pour le reste, le fonctionnement est tr s diff rent. Je n'ai jamais pris le temps de me pencher
sur le sujet... tu auras peut- tre quelqu'un d'autre pour te conseiller.
MichD
--------------------------------------------
Bonjour,
Pour ton exemple explicite de la commande dans ta question, tu pourrais u tiliser ceci :
'-------------------------------------
Sub Desactiver_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:=847)
Cbar.Enabled = False
Next
End Sub
'-------------------------------------
Sub Activer_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:=847)
Cbar.Enabled = True
Next
End Sub
'------------------------------------
Une proc dure de Laurent Longre pour lister les commandes et leur ID des versions Excel 1997 2003
Dim I As Integer, J As Integer
Sub ListeIDS()
'L Longre
Dim CmdB As CommandBar
I = 1: J = 0
Cells.Clear
Application.ScreenUpdating = False
For Each CmdB In Application.CommandBars
R curse CmdB
Next CmdB
With Range("A1").CurrentRegion
.Font.Size = 8
.EntireColumn.AutoFit
.EntireRow.AutoFit
End With
End Sub
Private Sub R curse(CmdB As Object)
Dim Ctrl As CommandBarControl
J = J + 1
For Each Ctrl In CmdB.Controls
With Cells(I, J)
.Value = Ctrl.Caption & IIf(Ctrl.BuiltIn, " = " & Ctrl.ID , "")
If J = 1 Then .Font.Bold = True
End With
If Ctrl.Type = msoControlPopup Then R curse Ctrl Else I = I + 1
Next Ctrl
J = J - 1
End Sub
Cependant, les exemples pour activer ou d sactiver une commande telle qu' nonc
en d but de fil est disponible que pour certaines commandes pour les vers ions 2007 et 2010.
Pour le reste, le fonctionnement est tr s diff rent. Je n'ai jamais pris le temps de me pencher
sur le sujet... tu auras peut- tre quelqu'un d'autre pour te conseiller.
MichD
--------------------------------------------
Bonjour,
Pour ton exemple explicite de la commande dans ta question, tu pourrais u tiliser ceci :
'-------------------------------------
Sub Desactiver_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = False
Next
End Sub
'-------------------------------------
Sub Activer_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = True
Next
End Sub
'------------------------------------
Une proc dure de Laurent Longre pour lister les commandes et leur ID des versions Excel 1997 2003
Dim I As Integer, J As Integer
Sub ListeIDS()
'L Longre
Dim CmdB As CommandBar
I = 1: J = 0
Cells.Clear
Application.ScreenUpdating = False
For Each CmdB In Application.CommandBars
R curse CmdB
Next CmdB
With Range("A1").CurrentRegion
.Font.Size = 8
.EntireColumn.AutoFit
.EntireRow.AutoFit
End With
End Sub
Private Sub R curse(CmdB As Object)
Dim Ctrl As CommandBarControl
J = J + 1
For Each Ctrl In CmdB.Controls
With Cells(I, J)
.Value = Ctrl.Caption & IIf(Ctrl.BuiltIn, " = " & Ctrl.ID , "")
If J = 1 Then .Font.Bold = True
End With
If Ctrl.Type = msoControlPopup Then R curse Ctrl Else I = I + 1
Next Ctrl
J = J - 1
End Sub
Cependant, les exemples pour activer ou d sactiver une commande telle qu' nonc
en d but de fil est disponible que pour certaines commandes pour les vers ions 2007 et 2010.
Pour le reste, le fonctionnement est tr s diff rent. Je n'ai jamais pris le temps de me pencher
sur le sujet... tu auras peut- tre quelqu'un d'autre pour te conseiller.
MichD
--------------------------------------------
Bonjour,
Pour ton exemple explicite de la commande dans ta question, tu pourrais utiliser ceci :
'-------------------------------------
Sub Desactiver_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = False
Next
End Sub
'-------------------------------------
Sub Activer_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = True
Next
End Sub
'------------------------------------
Une proc dure de Laurent Longre pour lister les commandes et leur ID des versions Excel 1997 2003
Dim I As Integer, J As Integer
Sub ListeIDS()
'L Longre
Dim CmdB As CommandBar
I = 1: J = 0
Cells.Clear
Application.ScreenUpdating = False
For Each CmdB In Application.CommandBars
R curse CmdB
Next CmdB
With Range("A1").CurrentRegion
.Font.Size = 8
.EntireColumn.AutoFit
.EntireRow.AutoFit
End With
End Sub
Private Sub R curse(CmdB As Object)
Dim Ctrl As CommandBarControl
J = J + 1
For Each Ctrl In CmdB.Controls
With Cells(I, J)
.Value = Ctrl.Caption & IIf(Ctrl.BuiltIn, " = " & Ctrl.ID, "")
If J = 1 Then .Font.Bold = True
End With
If Ctrl.Type = msoControlPopup Then R curse Ctrl Else I = I + 1
Next Ctrl
J = J - 1
End Sub
Cependant, les exemples pour activer ou d sactiver une commande telle qu' nonc
en d but de fil est disponible que pour certaines commandes pour les versions 2007 et 2010.
Pour le reste, le fonctionnement est tr s diff rent. Je n'ai jamais pris le temps de me pencher
sur le sujet... tu auras peut- tre quelqu'un d'autre pour te conseiller.
MichD
--------------------------------------------
Bonjour,
Pour ton exemple explicite de la commande dans ta question, tu pourrais utiliser ceci :
'-------------------------------------
Sub Desactiver_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = False
Next
End Sub
'-------------------------------------
Sub Activer_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = True
Next
End Sub
'------------------------------------
Une proc dure de Laurent Longre pour lister les commandes et leur ID des versions Excel 1997 2003
Dim I As Integer, J As Integer
Sub ListeIDS()
'L Longre
Dim CmdB As CommandBar
I = 1: J = 0
Cells.Clear
Application.ScreenUpdating = False
For Each CmdB In Application.CommandBars
R curse CmdB
Next CmdB
With Range("A1").CurrentRegion
.Font.Size = 8
.EntireColumn.AutoFit
.EntireRow.AutoFit
End With
End Sub
Private Sub R curse(CmdB As Object)
Dim Ctrl As CommandBarControl
J = J + 1
For Each Ctrl In CmdB.Controls
With Cells(I, J)
.Value = Ctrl.Caption & IIf(Ctrl.BuiltIn, " = " & Ctrl.ID, "")
If J = 1 Then .Font.Bold = True
End With
If Ctrl.Type = msoControlPopup Then R curse Ctrl Else I = I + 1
Next Ctrl
J = J - 1
End Sub
Cependant, les exemples pour activer ou d sactiver une commande telle qu' nonc
en d but de fil est disponible que pour certaines commandes pour les versions 2007 et 2010.
Pour le reste, le fonctionnement est tr s diff rent. Je n'ai jamais pris le temps de me pencher
sur le sujet... tu auras peut- tre quelqu'un d'autre pour te conseiller.
MichD
--------------------------------------------
Bonjour,
Pour ton exemple explicite de la commande dans ta question, tu pourrais utiliser ceci :
'-------------------------------------
Sub Desactiver_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = False
Next
End Sub
'-------------------------------------
Sub Activer_Commande_Supprimer_Feuille()
Dim Cbar As CommandBarControl
For Each Cbar In Application.CommandBars.FindControls(ID:„7)
Cbar.Enabled = True
Next
End Sub
'------------------------------------
Une proc dure de Laurent Longre pour lister les commandes et leur ID des versions Excel 1997 2003
Dim I As Integer, J As Integer
Sub ListeIDS()
'L Longre
Dim CmdB As CommandBar
I = 1: J = 0
Cells.Clear
Application.ScreenUpdating = False
For Each CmdB In Application.CommandBars
R curse CmdB
Next CmdB
With Range("A1").CurrentRegion
.Font.Size = 8
.EntireColumn.AutoFit
.EntireRow.AutoFit
End With
End Sub
Private Sub R curse(CmdB As Object)
Dim Ctrl As CommandBarControl
J = J + 1
For Each Ctrl In CmdB.Controls
With Cells(I, J)
.Value = Ctrl.Caption & IIf(Ctrl.BuiltIn, " = " & Ctrl.ID, "")
If J = 1 Then .Font.Bold = True
End With
If Ctrl.Type = msoControlPopup Then R curse Ctrl Else I = I + 1
Next Ctrl
J = J - 1
End Sub
Cependant, les exemples pour activer ou d sactiver une commande telle qu' nonc
en d but de fil est disponible que pour certaines commandes pour les versions 2007 et 2010.
Pour le reste, le fonctionnement est tr s diff rent. Je n'ai jamais pris le temps de me pencher
sur le sujet... tu auras peut- tre quelqu'un d'autre pour te conseiller.
MichD
--------------------------------------------
cette adresse :http://www.rondebruin.nl/tips.htm
la section : Excel 2007-2010 Ribbon and QAT pages
Tu auras beaucoup d'informations quant au fonctionnement de menus
d'Excel 2007 et 2010.
MichD
--------------------------------------------
cette adresse :http://www.rondebruin.nl/tips.htm
la section : Excel 2007-2010 Ribbon and QAT pages
Tu auras beaucoup d'informations quant au fonctionnement de menus
d'Excel 2007 et 2010.
MichD
--------------------------------------------
cette adresse :http://www.rondebruin.nl/tips.htm
la section : Excel 2007-2010 Ribbon and QAT pages
Tu auras beaucoup d'informations quant au fonctionnement de menus
d'Excel 2007 et 2010.
MichD
--------------------------------------------