OVH Cloud OVH Cloud

Control

1 réponse
Avatar
Emcy
Bonjours,

comment faire pour savoir si un control est un commandbarbutton ?

1 réponse

Avatar
PMO
Bonjour,

Essayez la procédure suivante qui énumère, à partir de
la barre "Standard", le type du bouton (TypeName) et,
s'il s'agit d'un CommandBarButton, affiche sa proriété
Caption (TypeOf).

'**********
Sub PMO_TypeButton()
Dim B As CommandBar
Dim C As Object
Dim A$
Set B = Application.CommandBars("Standard")
For Each C In B.Controls
A$ = ""
If TypeOf C Is CommandBarButton Then
A$ = vbCrLf & C.Caption
End If
MsgBox TypeName(C) & A$
Next C
End Sub
'**********

Cordialement.
--
PMO
Patrick Morange



Bonjours,

comment faire pour savoir si un control est un commandbarbutton ?