étant un novice en vba, je cherche à améliorer un code qui me semble très lourd.
Je cherche à renvoyer la valeur numerique d'une textbox dans une autre textbox en fonction de la valeur texte d'une combobox
voici le code dans la userform :
Private Sub calcul()
If ComboBox2.Value = "Alimentation stock boisson" Then
TextBox11 = TextBox6
ElseIf ComboBox2.Value = "60281 stock" Then
TextBox12 = TextBox6
ElseIf ComboBox2.Value = "plaques stock" Then
TextBox13 = TextBox6
End If
End Sub
Bonsoir le forum
Bonsoir ccia
Oupssss - Bonsoir Philippe
Pour éviter la personne qui va te venir en aide, bien vouloir joindre un fichier anonymisé avec le cbo, les TextBoxs, le CommandButton. Merci
Bonne soirée à toutes & à tous
@+ Eric c
Sub calcul()
Select Case ComboBox2.Value
Case Is = "Alimentation stock boisson"
TextBox11.Value = TextBox6.Value
Case Is = "60281 stock"
TextBox12.Value = TextBox6.Value
Case Is = "plaques stock"
TextBox13.Value = TextBox6.Value
End Select
End Sub
Sans fichier et sans voir le reste du code c'est un peu au pif...