Accéder à un objet crée sous condition ds un userform
Fermé
Help me please
-
15 juin 2015 à 13:45
cs_Le Pivert Messages postés 7904 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 14 août 2024 - 15 juin 2015 à 15:54
cs_Le Pivert Messages postés 7904 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 14 août 2024 - 15 juin 2015 à 15:54
A voir également:
- Accéder à un objet crée sous condition ds un userform
- Créer un compte google - Guide
- Comment créer un groupe whatsapp - Guide
- Excel cellule couleur si condition texte - Guide
- Créer un compte instagram sur google - Guide
- Créer un compte gmail - Guide
2 réponses
cs_Le Pivert
Messages postés
7904
Date d'inscription
jeudi 13 septembre 2007
Statut
Contributeur
Dernière intervention
14 août 2024
729
15 juin 2015 à 14:35
15 juin 2015 à 14:35
Bonjour,
Voir ceci:
https://silkyroad.developpez.com/VBA/ControlesUserForm/
Voir ceci:
https://silkyroad.developpez.com/VBA/ControlesUserForm/
Dim Ctrl As Control For Each Ctrl In UserForm1.Controls If Ctrl.Value = True Then MsgBox Ctrl.Name End If Next
cs_Le Pivert
Messages postés
7904
Date d'inscription
jeudi 13 septembre 2007
Statut
Contributeur
Dernière intervention
14 août 2024
729
15 juin 2015 à 15:54
15 juin 2015 à 15:54
Comme ceci:
Dim Ctrl As Control For Each Ctrl In UserForm1.Controls If TypeOf Ctrl Is MSForms.OptionButton Then If Ctrl.Value = True Then MsgBox Ctrl.Name End If End If Next
15 juin 2015 à 15:45
Dim ctrl As Control
Dim j As Integer
j = 1
For Each ctrl In Me.Controls
If TypeOf ctrl Is MSForms.OptionButton Then
If "OptionButton" & j = True Then
MsgBox "OptionButton" & j
End If
j = j + 1
End If
Next ctrl
Et j'ai un message d'erreur "Incompatibilité de type" sur le If "OptionButton" & j = True
Merci de votre aide