texbox visible selon valeur

gueval

XLDnaute Junior
Bonjour à tout le forum,

Mon problème est le suivant, je n'arrive pas à créer les lignes de code dans ma macro pour que si ma textbox7 est supperieur à 6 caractères alors ma
textbox8 est visible sinon invisible, par contre refaire le test quand je fais un nouveau choix dans ma combobox.
Voila un extrait de la macro
Merci à tous pour votre aide

Private Sub ComboBox1_Click()
If Me.ComboBox1.ListIndex = -1 Then Exit Sub

TextBox5 = DF.Range("AT" & Me.ComboBox1.ListIndex + 2)
TextBox6 = DF.Range("AQ" & Me.ComboBox1.ListIndex + 2)
TextBox7 = DF.Range("AF" & Me.ComboBox1.ListIndex + 2)
If Len(TextBox1.Value) < 6 Then
TextBox8.Visible = False
Else
If Len(TextBox1.Value) = 6 Then
TextBox8.Visible = True
End If
End If
TextBox8 = WS.Range("AO" & Me.ComboBox1.ListIndex + 2)
TextBox9 = DF.Range("AT" & Me.ComboBox1.ListIndex + 2)
 

Discussions similaires

Statistiques des forums

Discussions
312 248
Messages
2 086 593
Membres
103 248
dernier inscrit
Happycat