1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| Sub toto()
Dim i As Integer
Range("A1:A10000").Select
With Selection
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
End With
End Sub
Sub toto2()
ActiveSheet.UsedRange.Select
Debug.Print Selection.Rows.Count
Debug.Print Feuil1.Cells(Rows.Count, 1).End(xlUp).Row
End Sub
Sub toto3()
Range("A1").Select 'mieux en 1 ligne, mais moins explicite
ActiveCell.CurrentRegion.Select
Debug.Print Feuil1.Cells(Rows.Count, 1).End(xlUp).Row
End Sub
Sub toto4()
Selection.SpecialCells(xlCellTypeLastCell).Select
End Sub
Sub toto5()
Selection.SpecialCells(xlCellTypeBlanks).Select
End Sub
Sub Toto6()
Dim i As Byte
Columns("A:B").delete
For i = 5 To 15
Cells(i, 2) = i
Next i
End Sub
Sub toto7()
Dim i As Byte
Columns("A:B").delete
For i = 5 To 15
With Cells(i, 2)
.Value = i
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
End With
Next i
End Sub
Sub ZClearContents()
Dim i As Byte
Range(Cells(5, 2), Cells(15, 2)).ClearContents
End Sub
Sub Zdelete()
Dim i As Byte
Range(Cells(5, 2), Cells(15, 2)).delete
End Sub
Sub Zclear()
Dim i As Byte
Range(Cells(5, 2), Cells(15, 2)).clear
End Sub |
Partager