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
| Sub lancer_le_transfert()
'
' lancer_le_transfert Macro
' saisie des données venant du terrain
'
'
Sheets("IMPORT DU TERRAIN").Select
Rows("2:2").Select
Selection.Copy
Sheets("Feuille de saisie").Select
Rows("10:10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A10").Select
Application.CutCopyMode = False
Selection.Copy
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.TextToColumns Destination:=Range("A11"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="-", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
Sheets("BD").Select
Rows("2:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("Feuille de saisie").Select
Rows("2:2").Select
Selection.Copy
Sheets("BD").Select
Rows("2:2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
Columns("R:R").Select
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yyyy"
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("A2").Select
ActiveWorkbook.Worksheets("BD").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("BD").Sort.SortFields.Add Key:=Range("A2"), SortOn _
:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("BD").Sort
.SetRange Range("A1:R2")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Sheets("Feuille de saisie").Select
Rows("10:11").Select
Selection.ClearContents
Range("A8").Select
End Sub |
Partager