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
| Sub Valid_Saisie()
Dim ligne, Nbligne As Variant
Dim n As Variant
n = Range("NbLignes_saisie").Value
Range("L2:X2").Select
If n = "1" Then
Selection.Offset(n - 1, 0).Select
Selection.Copy
Else
Range(Selection, Selection.End(xlDown)).Select
End If
Sheets("Base").Select
Range("A2").Select
'***************************************
Nbligne = Range("TotLignesBase").Value
Selection.Offset(Nbligne, 0).Select
'***************************************
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False'Tri des données par date!
Dim derlig As Long
derlig = Range("A65536").End(3).Row
Range("A2:Q" & derlig).Sort Key1:=Range("A3")
Range("A" & derlig).Select
'***************************************
Sheets("SAISIE").Select
Range("C3,C5,N2:T2").Select
Selection.ClearContents
Range("B18:H18").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("L3:T3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Application.CutCopyMode = False
Sheets("SAISIE").Select
Range("C3").Select
End Sub |
Partager