Hi!
(sorry for my english)
On the form, I have a button to add files to a listbox (the box is bound to a worksheet)
Someone know how to program a button to remove a line from the listbox and the worksheet?
[vba]
Private Sub BoutonAjoutFichiers_Click()
Dim fichiers As String
FormulaireBackup.CommonDialog1.CancelError = True
On Error GoTo Annulé
FormulaireBackup.CommonDialog1.ShowOpen
fichiers = FormulaireBackup.CommonDialog1.Filename
Worksheets("ListeFichiers").Cells(Range("NoligneFile").Value + 1, 1) = fichiers
BoxListeFichiers.RowSource = "ListeFichiers!A2:A" & Trim(Range("NoligneFile").Value + 1)
Range("NoligneFile").Value = Range("NoligneFile").Value + 1
Annulé:
Exit Sub
End Sub
[/vba]
Thanks!