Bonjour,
voici mon code :
xlWorkSheet = CType(xlWorkBook.Sheets(ComboBox1.Text), Excel.Worksheet)
xlWorkSheet.Activate()
xlApp.Visible = True
Dim j As Integer
Dim lastrow As Integer
Dim lastcol As Integer
With xlWorkSheet
.Select()
j = xlApp.Cells.SpecialCells(2).Column
lastrow = xlApp.Cells.SpecialCells(2).Rows.End(XlDirection.xlDown).Row
lastcol = xlApp.Cells.SpecialCells(2).Columns.End(XlDirection.xlToRight).Column
For thiscol = j To lastcol
.Cells(lastrow + 1, thiscol).Value = _
xlApp.Sum(.Range(.Cells(1, thiscol), .Cells(lastrow, thiscol)))
Next
End With
je veux ajouter le mot "somme" à la fin du tableau
EDIT: Ajout de
la coloration syntaxique.