Bonjour,
voila ton code :
Private Sub Command1_Click()
Dim xls As Excel.Application
Dim xlsfeuille As Excel.Worksheet
Dim xlsclasseur As Excel.Workbook
Dim pchar As String
Set xls = CreateObject("Excel.Application")
Set xlsclasseur = xls.Workbooks.Add
Set xlsfeuille = xlsclasseur.Worksheets(1)
xlsfeuille.Cells(3, 1).Value = "MA FEUILLE EXCEL EST BELLE ET BIEN CREE"
xlsfeuille.Cells(4, 1).Value = "C'EST FACILE NON"
CommonDialog1.Filter = "Fichiers excel (*.xls)|*.xls"
CommonDialog1.ShowSave
chpath = CommonDialog1.FileName
If chpath <> "" Then
xlsclasseur.SaveAs (chpath)
End If
xls.Application.Quit
Set xls = Nothing
MsgBox "FIN DE L'EXPORTATION", vbOKOnly + vbInformation, "GESTION DES STATISTIQUES"
J'ai mis directement quand je clique sur un bouton mais il me souligne plein de truk. il faut pa faire des imports ou autres choses ?