OVH Cloud OVH Cloud

N° ID

4 réponses
Avatar
gilbert
Bonjour

Quelqu' un pourrait-il me dire comment on trouve le numéro de ID dans un
findcontrol ?

Exemple de Papou ce matin:
Application.CommandBars("Tools").FindControl(ID:=522).Enabled = False

merci

Gilbert

4 réponses

Avatar
papou
Re
Répondu à l'instant sur le fil précédent.
Cordialement
Pascal
"gilbert" a écrit dans le message de
news:
Bonjour

Quelqu' un pourrait-il me dire comment on trouve le numéro de ID dans un
findcontrol ?

Exemple de Papou ce matin:
Application.CommandBars("Tools").FindControl(ID:R2).Enabled = False

merci

Gilbert




Avatar
gilbert
Super merci encore

Gilbert

"papou" <cestpasbon@çanonplus44.fr> a écrit dans le message de
news:
Re
Répondu à l'instant sur le fil précédent.
Cordialement
Pascal
"gilbert" a écrit dans le message de
news:
Bonjour

Quelqu' un pourrait-il me dire comment on trouve le numéro de ID dans un
findcontrol ?

Exemple de Papou ce matin:
Application.CommandBars("Tools").FindControl(ID:R2).Enabled = False

merci

Gilbert








Avatar
Jacky
Bonjour Gilbert

Ci-dessous un code de Michdenis pour lister tous les ID

_--------------------------------
Sub FindControlID()

Dim B As Object, Nb As Integer
Nb = Application.CommandBars.Count
[A1].Resize(, 2).Value = Array("Caption", "ID")

For x = 1 To Nb
For Each B In Application.CommandBars.Item(x).Controls
With [A65536].End(xlUp).Offset(1)
.Value = B.Caption
.Offset(, 1).Value = B.ID
End With
Next
Next
Range("A1:B1").EntireColumn.AutoFit
Set A = Nothing: Set B = Nothing
End Sub
'--------------------------------
Salutations
JJ

"gilbert" a écrit dans le message de
news:
Bonjour

Quelqu' un pourrait-il me dire comment on trouve le numéro de ID dans un
findcontrol ?

Exemple de Papou ce matin:
Application.CommandBars("Tools").FindControl(ID:R2).Enabled = False

merci

Gilbert




Avatar
gilbert
Merci également Jacky

Salutations

Gilbert

"Jacky" a écrit dans le message
de news:
Bonjour Gilbert

Ci-dessous un code de Michdenis pour lister tous les ID

_--------------------------------
Sub FindControlID()

Dim B As Object, Nb As Integer
Nb = Application.CommandBars.Count
[A1].Resize(, 2).Value = Array("Caption", "ID")

For x = 1 To Nb
For Each B In Application.CommandBars.Item(x).Controls
With [A65536].End(xlUp).Offset(1)
.Value = B.Caption
.Offset(, 1).Value = B.ID
End With
Next
Next
Range("A1:B1").EntireColumn.AutoFit
Set A = Nothing: Set B = Nothing
End Sub
'--------------------------------
Salutations
JJ

"gilbert" a écrit dans le message de
news:
Bonjour

Quelqu' un pourrait-il me dire comment on trouve le numéro de ID dans un
findcontrol ?

Exemple de Papou ce matin:
Application.CommandBars("Tools").FindControl(ID:R2).Enabled = False

merci

Gilbert