Afficher 1 usf en fonction de check box

Toutou

XLDnaute Occasionnel
Bonjour a tous,
Dans 1 USF j'ai 4 Checkbox, différentes combinaisons sont donc possible. Chaque checkbox correspond à un USF mais fonction de la combinaison 1 autre (parmis 5) USF apparait avec des parties visible ou non.
Exple: avec le code suivant, les USF 1 et 3 s'affichent:
IF checkbox1=true then
USF1.Show
End If

If Checkbox3=True then
USF3.Show
End If

Mais ce que je voudrait c'est plutot quelque chos comme cela:

If CheckBox1=True and Checkbox3=True Then
USF1.Show and USF1.Frame3.Visible=True
End IF

Mais le mot 'and' fait boguer le programme; si je tape:

IF checkbox1=true then
USF1.Show
End If

If Checkbox3=True then
USF1.Frame3.Visible=True
End If

If Checkbox3=True then
USF3.Show
End If

Alors les deux USF apparaissent quand je sélectionne les deux Checkbox.

Coment faire en sorte que seul ce qui correspond à la combinaison apparaisse?

La boucle IF est-elle la bonne?
J'ai essayé avec ElseIF, mais jme suis embrouillé dans mon code...
Qqun aurait-il une solution à m'apporter?
 

Robert

XLDnaute Barbatruc
Repose en paix
Bonjour Toutou, bonjour le forum,

Pas sûr d'avoir bien compris mais j'essaierais:

If CheckBox1=True and Checkbox3=True Then
USF1.Frame3.Visible=True
USF1.Show
End IF

If Checkbox3=True And CheckBox1.Value = False then
USF3.Show
End If
 

Statistiques des forums

Discussions
312 339
Messages
2 087 401
Membres
103 537
dernier inscrit
alisafred974