Pb command bouton

Résolu
manud31 Messages postés 81 Date d'inscription vendredi 28 octobre 2005 Statut Membre Dernière intervention 16 mai 2006 - 15 déc. 2005 à 19:14
jpleroisse Messages postés 1788 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 11 mars 2006 - 15 déc. 2005 à 20:07
Bonsoir,

Comment peut-on avoir le texte d'un command button sur 2 lignes?

Merci d'avance

2 réponses

jpleroisse Messages postés 1788 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 11 mars 2006 27
15 déc. 2005 à 20:07
Bonsoir,

En VBA Excel,



Private Sub CommandButton1_Click()

CommandButton1.AutoSize = True

CommandButton1.Caption = ""

CommandButton1.Caption = CommandButton1.Caption & "Bonjour " & vbCrLf & "Papa" & vbCrLf

End Sub



En VB6



Private Sub Command1_Click()

Command1.Height = 600

Command1.Caption = ""

Command1.Caption = Command1.Caption & "Bonjour " & vbCrLf & "Papa" & vbCrLf

End Sub



jpleroisse



Si une réponse vous convient, cliquez Réponse Acceptée.
3
Utilisateur anonyme
15 déc. 2005 à 19:49
Bonjoue,

vbcrlf : retour à la ligne
TonButton.Text = "1ere ligne" & vbcrlf & "2nd ligne"

Kenji
<hr size="2" width="100%">
Merci de cliquer sur "Réponse acceptée" si une réponse vous convient.
0
Rejoignez-nous