Bjr,
Par quoi remplacer ce code pour ne pas avoir d'erreur quand il n'y a qu'une ligne ou qu'une colonne ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Dim feuil1 As Worksheet Dim nbli As Integer, nbcol As Integer Set feuil1 = worksheets("feuil1") nbcol = feuil1.Cells(1, 1).CurrentRegion.End(xlToRight).Column nbli = feuil1.Cells(1, 1).CurrentRegion.End(xlDown).Row msg = "nb de lignes =" & nbli & " nb de colonnes =" & nbcol MsgBox msg
Partager