listbox en tête

D

damien

Guest
bonjour
merci a tous
je voudrai mettre mes entêtes de colonnes donc je mis ListBox1.ColumnHeads = True etles casses sont vides.

de plus avec un checkbox il me renvoi vrai quand il est cocher mais a la place de vrai je voudrai 'oui'.


Private Sub CommandButton3_Click()
Range('e13').Select
Selection.ClearContents
Range('f14').Select
Selection.ClearContents

Dim strTitle, strInformation As String
If Label10 = '' Then
MsgBox ('veuiller saisir la date!')
Exit Sub

End If


Dim xlig As Byte

xlig = Range('a5000').End(xlUp).Row + 1

Cells(xlig, 4) = Label5 'port
Cells(xlig, 5) = Label2 'immat
Cells(xlig, 6) = Label3 'nom
Cells(xlig, 7) = Label8 'pavillon
Cells(xlig, 8) = ComboBox1 'moyen
Cells(xlig, 9) = TextBox1 & ComboBox3 & ' ' & TextBox2 & ComboBox2 'position
Cells(xlig, 10) = ComboBox4 'zone ciem
Cells(xlig, 1) = Label10 'date
Cells(xlig, 11) = ComboBox5 & ' ' & TextBox4 'suite
Cells(xlig, 12) = ComboBox6 'plan
Cells(xlig, 3) = ComboBox7 'controle
Cells(xlig, 13) = ComboBox8 'infraction
Cells(xlig, 2) = TextBox3 'heure
Cells(xlig, 14) = CheckBox1.Value 'DEROUTEMENT
Cells(xlig, 15) = TextBox5 'commentaires
UserForm3.Hide

UserForm1.Hide
Unload Me
End Sub

merci

ps: merci JC de lorient
 

Hervé

XLDnaute Barbatruc
Bonsoir damien

Il faudrait que tu nous dises comment tu alimentes t listbox, en effet la propiété ColumnHeads ne fonctionne qu'avec la méthode rowsource. peux tu nous joindre ta macro d'initialisation.

pour ton checkbox, tu peut peut etre essayer ce type de syntaxe :

Cells(xlig, 14) = IIf(CheckBox1, 'OUI', 'NON')

en attendant de te lire pour la listbox

salut
 

Discussions similaires

D
Réponses
1
Affichages
832
D
Réponses
4
Affichages
1 K
D
D
Réponses
0
Affichages
825
D

Statistiques des forums

Discussions
312 446
Messages
2 088 493
Membres
103 870
dernier inscrit
didiexcel