Enregistrement d'un fichier Excel par automation
Titre modifié par sinarf
Evitez les titre en anglais ou peu clair cela nuit à la lisibilité du forum. Merci !
bonjour,
j'ouvre un fichier excel que je transforme et j'essais de le sauvegarder mais j'ai systematiquement un message
Citation:
A file named 'RESUME.XLW' already exists in this location. Do you want to replace it?
je ne comprend pas ce message, et comment l'éviter?
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "NTO_BASE", "C:\Documents and Settings\panaville\Desktop\Nicolas_P\nto\NTO_BASE.xls", True
Set App = CreateObject("Excel.application")
App.Workbooks.Open "C:\Documents and Settings\panaville\Desktop\Nicolas_P\nto\NTO_BASE.xls"
App.Sheets("NTO_BASE").Name = "Sheet1"
With App.Worksheets("Sheet1")
.cells(1, 1).Select
.cells(1, 1).EntireRow.Insert
.cells(1, 1).FormulaR1C1 = "=COUNT(R[2]C:R[9996]C)"
End With
App.Save |
Merci pour vos rep