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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| Private Sub workbook_open()
Dim nbl As Variant
Workbooks.Open Filename:="J:\Siege\8. Immo Orga\32. Rapprochement Comptable\6. Suivi\Export_TOTAL.xlsx"
'va cibler l'activeworkbook en cours + Select inutile
' Rows("1:2").Select
' Selection.Delete Shift:=xlUp
Activeworkbook.Rows("1:2").Delete Shift:=xlUp
nbl = Range("C1").SpecialCells(xlCellTypeLastCell).Row - 2 'Pourquoi -2 ?
MsgBox nbl 'Pourquoi faire ?
'Idem
'Columns("A:A").Select
'Selection.Insert Shift:=xlToRight
Activeworkbook.Activesheet.Columns("A:A").Insert Shift:=xlToRight
'Idem
'Range("A1").Select
'ActiveCell.FormulaR1C1 = "DR"
Activeworkbook.Activesheet.Range("A1").Value = "DR"
'Idem
'Range("A2").Select
' ActiveCell.FormulaR1C1 = "=VALUE(LEFT(RC[6],2))"
' Selection.AutoFill Destination:=Range("A2:A" & nbl)
Activeworkbook.Activesheet.Range("A2").FormulaR1C1 = "=VALUE(LEFT(RC[6],2))"
Activeworkbook.ActivesheetRange("A2").AutoFill Destination:=Range("A2:A" & nbl)
'Idem
' Columns("A:A").Select
' Selection.Copy
' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Activeworkbook.Activesheet.Columns("A:A").Copy
Activeworkbook.Activesheet.Columns("A:A")..PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Idem
' Columns("A:A").Select
' Selection.Replace What:="74", Replacement:="8", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("A:A").Select
Columns("A:A").Replace What:="74", Replacement:="8", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
'Idem
' Columns("B:B").Select
' Selection.TextToColumns
Columns("B:B").TextToColumns
'Idem
' Range("E:L,O:AA").Select
' Selection.Delete Shift:=xlToLeft
Range("E:L,O:AA").Delete Shift:=xlToLeft
'Idem
Activeworkbook.Activesheet.Range("$A$1:$A$" & nbl).AutoFilter Field:=4, Criteria1:=Array( _
"Démolition/Reconstruction", "Ouverture", "Transfert"), Operator:= _
xlFilterValues
'Idem
'Range("A2:F2").Select
' Range(Selection, Selection.End(xlDown)).Select
' Selection.Copy
Activeworkbook.Activesheet.Range(Range("A2:F2"), Range("A2:F2").End(xlDown)).Copy
' Windows("Suivi des Rapprochements.xlsm").Activate
' Sheets("EXPORT TOTAL").Select
' Range("A2").Select
' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Workbook("Suivi des Rapprochements.xlsm").Sheets("EXPORT TOTAL").Range("A2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub |
Partager