Copier plusieurs textbox dans une seule
MichelRRG74 -
Bonjour,
Je souhaiterais copier les données de plusieurs textbox dans une seule textebox afin d'obtenir un résumé complet de ma saisie.
Pour cela j'ai trouvé le code suivant mais j'aimerais si une textbox est vide qu'elle ne soit pas inscrite dans le résumé.
Tbresumé.Text = _
"Bonjour, " & vbCrLf & vbCrLf _
& "Ci-dessous voici un lead pré-qualifié : " & vbCrLf & vbCrLf _
& "Contact : " & TBcontact.Text & " (CDP : " & TBnuméroclientcdp.Text & ")" & vbCrLf _
& "Entité : " & TBentité.Text & vbCrLf _
& "Téléphone : " & TBtéléphone.Text & vbCrLf _
& "E-Mail : " & TBmail.Text & vbCrLf _
& "Site : " & CBsite.Text & vbCrLf & vbCrLf _
& "Sa demande : " & TBdemande.Text & vbCrLf _
& "Modèle : " & TBmodèle.Text & vbCrLf _
& "Couleur : " & TBcouleur.Text & vbCrLf & "Options : " & TBoptions.Text & vbCrLf _
& "Reprise : " & TBreprise.Text & vbCrLf _
& "Fiche de reprise : " & TBfiche.Text & vbCrLf _
& "Financement : " & TBfinancement.Text & vbCrLf & vbCrLf _
& "Date du Projet : " & TBdateduprojet.Text & vbCrLf _
& "Disponibilité : " & TBdisponibilité.Text & vbCrLf
Je vous remercie par avance
- Copier plusieurs textbox dans une seule
- Comment copier une vidéo youtube - Guide
- Comment imprimer un tableau excel sur une seule page - Guide
- Super copier - Télécharger - Gestion de fichiers
- Regrouper plusieurs feuilles excel en une seule - Guide
- Application se ferme toute seule android - Guide
2 réponses
Bonjour,
Essaie :
Dim Txt As String
Txt = "Bonjour, " & vbCrLf & vbCrLf _
& "Ci-dessous voici un lead pré-qualifié : " & vbCrLf & vbCrLf
If TBcontact.Text <> "" Then
Txt = Txt & "Contact : " & TBcontact.Text & " (CDP : " & TBnuméroclientcdp.Text & ")" & vbCrLf
End If
If TBentité.Text <> "" Then
Txt = Txt & "Entité : " & TBentité.Text & vbCrLf
End If
If TBtéléphone.Text <> "" Then
Txt = Txt & "Téléphone : " & TBtéléphone.Text & vbCrLf
End If
If TBmail.Text <> "" Then
Txt = Txt = "E-Mail : " & TBmail.Text & vbCrLf
End If
If CBsite.Text <> "" Then
Txt = txtt & "Site : " & CBsite.Text & vbCrLf & vbCrLf
End If
If TBdemande.Text <> "" Then
Txt = Txt & "Sa demande : " & TBdemande.Text & vbCrLf
End If
If TBmodèle.Text <> "" Then
Txt = Txt & "Modèle : " & TBmodèle.Text & vbCrLf
End If
If TBcouleur.Text <> "" Then
Txt = Txt & "Couleur : " & TBcouleur.Text & vbCrLf & "Options : " & TBoptions.Text & vbCrLf
End If
If TBreprise.Text <> "" Then
Txt = Txt & "Reprise : " & TBreprise.Text & vbCrLf
End If
If TBfiche.Text <> "" Then
Txt = Txt & "Fiche de reprise : " & TBfiche.Text & vbCrLf
End If
If TBfinancement.Text <> "" Then
Txt = Txt & "Financement : " & TBfinancement.Text & vbCrLf & vbCrLf
End If
If TBdateduprojet.Text <> "" Then
Txt = Txt & "Date du Projet : " & TBdateduprojet.Text & vbCrLf
End If
If TBdisponibilité.Text <> "" Then
Txt = Txt & "Disponibilité : " & TBdisponibilité.Text & vbCrLf
End If
Tbresumé.Text = Txt
Daniel
Merci DanielC0 Après quelques modifications de ton code j'ai pu trouver ce dont j'avait besoin tu m'enlevé un épine du pied ????