Bonjour
Je vous expose mon problème
j'ai un fichier excel contenant un série de 5 onglets.
avec ce code j'arrive a écrire un fichier excel
Application.DisplayAlerts = False
Rem création fichier excel et copie onglets
Dim XLApp As New Excel.Application
Dim XLBook As Workbook
Dim XLSheet As Worksheet
Set XLBook = XLApp.Workbooks.Add
Set XLSheet = XLBook.Worksheets.Add
XLBook.SaveAs "G:\D - IT\extraction\Outils coupants\report.xlsx"
'XLBook.SaveAs "E:\extraction\Outils coupants\report.xlsx"
XLBook.Close (True)
Application.DisplayAlerts = True
Mon problème est que je n'arrive pas a copier seulement certains onglets de mon fichier A pour les mettre dans mon fichier B.
Workbooks("outils coupants.xlsm").Sheets("Global").Copy Before:=Workbooks("G:\\D - IT\\extraction\\Outils coupants\\report.xlsx").Sheets("Feuil1")
cela ne fonctionne pas...
Avez vous une petite idée ami EXCELiens et EXCCELiennes