Bonjour.
Si je crée un classeur et lui ajoute une feuille de travail avec ce codela nouvelle feuille se place bien ou je veux : en dernière position.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Dim xlApp As Excel.Application Dim oWbk As Excel.Workbook Set xlApp = New Excel.Application xlApp.Visible = True Set oWbk = xlApp.Workbooks.Add oWbk.Worksheets.Add , oWbk.Worksheets(oWbk.Worksheets.Count), 1, xlWorksheet Set xlApp = Nothing Set oWbk = Nothing
Maintenant si je fais la même chose, mais en ajoutant une feuille graphiqueElle s'ajoute en avant dernière position
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Dim xlApp As Excel.Application Dim oWbk As Excel.Workbook Set xlApp = New Excel.Application xlApp.Visible = True Set oWbk = xlApp.Workbooks.Add oWbk.Sheets.Add , oWbk.Sheets(oWbk.Sheets.Count), 1, xlChart Set xlApp = Nothing Set oWbk = Nothing
Je cherche l'erreur. Merci d'avance pour vos lumières.
Cordialement,
PGZ
Partager