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
michdenis
Un exemple :
Commande imprimer de la barre d'outils Standard
Sub test() Dim Nb As Integer, A As Integer Nb = Application.CommandBars("standard").Controls.Count For A = 1 To Nb If Application.CommandBars("standard").Controls(A).Caption = "Imprimer (Fax)" Then MsgBox A End If Next End Sub
"thomas" <nomail> a écrit dans le message de news:
Bonjour,
Comment connaître par VBA Excel 2003 la position d'une commande dans un menu ?
Merci
Un exemple :
Commande imprimer de la barre d'outils Standard
Sub test()
Dim Nb As Integer, A As Integer
Nb = Application.CommandBars("standard").Controls.Count
For A = 1 To Nb
If Application.CommandBars("standard").Controls(A).Caption = "Imprimer
(Fax)" Then
MsgBox A
End If
Next
End Sub
"thomas" <nomail> a écrit dans le message de news:
uFfre42FJHA.6132@TK2MSFTNGP04.phx.gbl...
Bonjour,
Comment connaître par VBA Excel 2003 la position d'une commande dans un menu
?
Sub test() Dim Nb As Integer, A As Integer Nb = Application.CommandBars("standard").Controls.Count For A = 1 To Nb If Application.CommandBars("standard").Controls(A).Caption = "Imprimer (Fax)" Then MsgBox A End If Next End Sub
"thomas" <nomail> a écrit dans le message de news:
Bonjour,
Comment connaître par VBA Excel 2003 la position d'une commande dans un menu ?