OVH Cloud OVH Cloud

barre d'outils (encore et encore...)

2 réponses
Avatar
ced
resalut,

comment faire pour savoir si une barre d'outils existe=20
d=E9ja en connaissant seulement son nom ?

2 réponses

Avatar
Eric
Bonjour

Sub test()
Dim Cb As CommandBar
For Each Cb In CommandBars
If Cb.Name = "LeNomDeLaBarre" Then MsgBox "La barre
d'outil ""LeNomDeLaBarre"" existe"
Next
End Sub

Bon courage

Eric



-----Message d'origine-----
resalut,

comment faire pour savoir si une barre d'outils existe
déja en connaissant seulement son nom ?
.



Avatar
Alain CROS
Bonjour.

Un petite fonction.

Function CommandBarExist(MaBarreName As String) As Boolean
Dim CB As CommandBar
On Error Resume Next
Set CB = CommandBars(MaBarreName)
CommandBarExist = Not CB Is Nothing
Set CB = Nothing
End Function

Alain CROS.

"ced" a écrit dans le message de news: 07c401c352a1$02de6f10$
resalut,

comment faire pour savoir si une barre d'outils existe
déja en connaissant seulement son nom ?