Dim nombre As Single ' variable qui contient la valeur If List1.ListIndex = -1 Then nombre = -1 ' valeur par défaut Else nombre = Val(List1.List(List1.ListIndex)) ' valeur sélectionnée End If Select case nombre Case -1 Ton calcul pour cette valeur Case -1.5 Ton calcul pour cette valeur Case ...... Case ....... End Select
List1.Selected(10) = True
List1.Selected(-65) = True
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionif List3.listindex = -1 thenje comprends que je tape cela dans mon code dans la zone de mon command_button. J'espère être dans le vrai
If List3.Text = "-0.0" Then Text33.Text = ............. Text47.Text = ............. Text48.Text = ............. Text52.Text = ............. Text49.Text = ............. Text38.Text = ............. End If If List3.Text = "-0.1" Then Text33.Text = ............. Text47.Text = ............. Text48.Text = ............. Text52.Text = ............. Text49.Text = ............. Text38.Text = ............. End If If List3.Text = "-0.2" Then Text33.Text = ............. Text47.Text = ............. Text48.Text = ............. Text52.Text = ............. Text49.Text = ............. Text38.Text = ............. End If End sub
If List3.listindex = -1 then List3.Selected "-1.0" = True End If Else If List3.Text = "-0.0" Then Text33.Text = ............. Text47.Text = ............. Text48.Text = ............. Text52.Text = ............. Text49.Text = ............. Text38.Text = ............. End If If List3.Text = "-0.1" Then Text33.Text = ............. Text47.Text = ............. Text48.Text = ............. Text52.Text = ............. Text49.Text = ............. Text38.Text = ............. End If If List3.Text = "-0.2" Then Text33.Text = ............. Text47.Text = ............. Text48.Text = ............. Text52.Text = ............. Text49.Text = ............. Text38.Text = ............. End If End sub
If List3.Text = "-0.0" Then
List3.ListIndex = 0et le tour sera joué...
If List3.Text = "0.0" Then ...
If List3.ListIndex = 0 Then ...
List3.ListIndex = index 'index de "-1.00" dans la listebox
dim valeur as single if list3.listindex = - 1 then valeur = -1 Else valeur = val(list3.list(list3.listindex)) end if