Condition si combobox contient un mot

Florian53

XLDnaute Impliqué
Bonjour à tous,

Je souhaiterais rendre visible une textbox si la combobox contient un mot,

Code:
Private Sub ComboBox_imputation_Change()
Data1 = "Rcp_ABC"
If ComboBox_imputation.ListIndex = UCase(Data1) Then TextBox7.Visible = True
End Sub

J'ai essayé avec ce code mais sa ne fonctionne pas. Pouvez vous me guider svp.

Cordialement
 

Florian53

XLDnaute Impliqué
ouf j'ai enfin trouvé pour ce à qui sa pourrait intéresser voici le code :

Code:
Private Sub ComboBox1_Change()
Data1 = "Rcp_ABC"

If InStr(ComboBox1.Value, "ABC") > 0 Then
Label11.Visible = True
TextBox11.Visible = True
Else
Label11.Visible = False
TextBox11.Visible = False
End If

End Sub
 

ERIC S

XLDnaute Barbatruc
Re

désolé je répondais à une demande boulot

j'arrivais à
Code:
Private Sub ComboBox_imputation_Change()
Dim data
data = "Rcp - ABC"
If ComboBox_imputation.Value = data Then
    Label_1.Visible = True
    Txt_1.Visible = True
Else
    Label_1.Visible = False
    Txt_1.Visible = False
End If
End Sub
 

Discussions similaires

Membres actuellement en ligne

Statistiques des forums

Discussions
312 196
Messages
2 086 099
Membres
103 116
dernier inscrit
kutobi87