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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
| Sub tbPARIS()
Worksheets("tbPARIS").Visible = True
Sheets("tbPARIS").Select
Range("k2").Value2 = Range("k2").Value2 + 290
Range("k3").Value2 = Range("k3").Value2 + 290
Range("k4").Value2 = Range("k4").Value2 + 290
Range("k5").Value2 = Range("k5").Value2 + 290
Range("k6").Value2 = Range("k6").Value2 + 290
Range("k7").Value2 = Range("k7").Value2 + 290
Range("k8").Value2 = Range("k8").Value2 + 290
Range("k9").Value2 = Range("k9").Value2 + 290
Range("k10").Value2 = Range("k10").Value2 + 290
Range("k11").Value2 = Range("k11").Value2 + 290
Range("k12").Value2 = Range("k12").Value2 + 290
Range("k13").Value2 = Range("k13").Value2 + 290
Range("k14").Value2 = Range("k14").Value2 + 290
Range("k15").Value2 = Range("k15").Value2 + 290
Range("k16").Value2 = Range("k16").Value2 + 290
Range("k17").Value2 = Range("k17").Value2 + 290
Range("k18").Value2 = Range("k18").Value2 + 290
Range("k19").Value2 = Range("k19").Value2 + 290
Range("k20").Value2 = Range("k20").Value2 + 290
Range("k21").Value2 = Range("k21").Value2 + 290
Range("k22").Value2 = Range("k22").Value2 + 290
Range("k23").Value2 = Range("k23").Value2 + 290
Range("k24").Value2 = Range("k24").Value2 + 290
Range("k25").Value2 = Range("k25").Value2 + 290
Range("k26").Value2 = Range("k26").Value2 + 290
Range("k27").Value2 = Range("k27").Value2 + 290
Range("k28").Value2 = Range("k28").Value2 + 290
Range("k29").Value2 = Range("k29").Value2 + 290
Range("k30").Value2 = Range("k30").Value2 + 290
Range("k31").Value2 = Range("k31").Value2 + 290
Range("k32").Value2 = Range("k32").Value2 + 290
Range("k33").Value2 = Range("k33").Value2 + 290
Range("k34").Value2 = Range("k34").Value2 + 290
Range("k35").Value2 = Range("k35").Value2 + 290
Range("k36").Value2 = Range("k36").Value2 + 290
Range("k37").Value2 = Range("k37").Value2 + 290
Range("k38").Value2 = Range("k38").Value2 + 290
Range("k39").Value2 = Range("k39").Value2 + 290
Range("k40").Value2 = Range("k40").Value2 + 290
Range("k41").Value2 = Range("k41").Value2 + 290
Range("k42").Value2 = Range("k42").Value2 + 290
Range("k43").Value2 = Range("k43").Value2 + 290
Range("k44").Value2 = Range("k44").Value2 + 290
Range("k45").Value2 = Range("k45").Value2 + 290
Range("k46").Value2 = Range("k46").Value2 + 290
Range("k47").Value2 = Range("k47").Value2 + 290
Range("k48").Value2 = Range("k48").Value2 + 290
Range("k49").Value2 = Range("k49").Value2 + 290
Range("k50").Value2 = Range("k50").Value2 + 290
Range("k51").Value2 = Range("k51").Value2 + 290
Range("k52").Value2 = Range("k52").Value2 + 290
Range("k53").Value2 = Range("k53").Value2 + 290
Range("k54").Value2 = Range("k54").Value2 + 290
Range("k55").Value2 = Range("k55").Value2 + 290
Range("k56").Value2 = Range("k56").Value2 + 290
Range("k57").Value2 = Range("k57").Value2 + 290
Range("k58").Value2 = Range("k58").Value2 + 290
Range("k59").Value2 = Range("k59").Value2 + 290
Range("k60").Value2 = Range("k60").Value2 + 290
Range("k61").Value2 = Range("k61").Value2 + 290
Range("k62").Value2 = Range("k62").Value2 + 290
Range("k63").Value2 = Range("k63").Value2 + 290
Range("k64").Value2 = Range("k64").Value2 + 290
Range("k65").Value2 = Range("k65").Value2 + 290
Range("k66").Value2 = Range("k66").Value2 + 290
Range("k67").Value2 = Range("k67").Value2 + 290
Range("k68").Value2 = Range("k68").Value2 + 290
Range("k69").Value2 = Range("k69").Value2 + 290
Range("k70").Value2 = Range("k70").Value2 + 290
Range("k71").Value2 = Range("k71").Value2 + 290
Range("k72").Value2 = Range("k72").Value2 + 290
Range("k73").Value2 = Range("k73").Value2 + 290
Range("k74").Value2 = Range("k74").Value2 + 290
Range("k75").Value2 = Range("k75").Value2 + 290
Range("k76").Value2 = Range("k76").Value2 + 290
Range("k77").Value2 = Range("k77").Value2 + 290
Range("k78").Value2 = Range("k78").Value2 + 290
Range("k79").Value2 = Range("k79").Value2 + 290
Range("k80").Value2 = Range("k80").Value2 + 290
Range("k81").Value2 = Range("k81").Value2 + 290
Range("k82").Value2 = Range("k82").Value2 + 290
Range("k83").Value2 = Range("k83").Value2 + 290
Range("k84").Value2 = Range("k84").Value2 + 290
Range("k85").Value2 = Range("k85").Value2 + 290
Range("k86").Value2 = Range("k86").Value2 + 290
Range("k87").Value2 = Range("k87").Value2 + 290
Range("k88").Value2 = Range("k88").Value2 + 290
Range("k89").Value2 = Range("k89").Value2 + 290
Range("k90").Value2 = Range("k90").Value2 + 290
Range("k91").Value2 = Range("k91").Value2 + 290
Range("k92").Value2 = Range("k92").Value2 + 290
Range("k93").Value2 = Range("k93").Value2 + 290
Range("k94").Value2 = Range("k94").Value2 + 290
Range("k95").Value2 = Range("k95").Value2 + 290
Range("k96").Value2 = Range("k96").Value2 + 290
Range("k97").Value2 = Range("k97").Value2 + 290
Range("k98").Value2 = Range("k98").Value2 + 290
Range("k99").Value2 = Range("k99").Value2 + 290
Range("k100").Value2 = Range("k100").Value2 + 290
Range("k101").Value2 = Range("k101").Value2 + 290
Range("k102").Value2 = Range("k102").Value2 + 290
Range("k103").Value2 = Range("k103").Value2 + 290
Range("k104").Value2 = Range("k104").Value2 + 290
Range("k105").Value2 = Range("k105").Value2 + 290
Range("k106").Value2 = Range("k106").Value2 + 290
Range("k107").Value2 = Range("k107").Value2 + 290
Range("k108").Value2 = Range("k108").Value2 + 290
Range("k109").Value2 = Range("k109").Value2 + 290
Range("k110").Value2 = Range("k110").Value2 + 290
Range("k111").Value2 = Range("k111").Value2 + 290
Range("k112").Value2 = Range("k112").Value2 + 290
Range("k113").Value2 = Range("k113").Value2 + 290
Range("k114").Value2 = Range("k114").Value2 + 290
Range("k115").Value2 = Range("k115").Value2 + 290
Range("k116").Value2 = Range("k116").Value2 + 290
Range("k117").Value2 = Range("k117").Value2 + 290
Range("k118").Value2 = Range("k118").Value2 + 290
Range("k119").Value2 = Range("k119").Value2 + 290
Range("k120").Value2 = Range("k120").Value2 + 290
Range("k121").Value2 = Range("k121").Value2 + 290
Range("k122").Value2 = Range("k122").Value2 + 290
Range("k123").Value2 = Range("k123").Value2 + 290
Range("k124").Value2 = Range("k124").Value2 + 290
Range("k125").Value2 = Range("k125").Value2 + 290
Range("k126").Value2 = Range("k126").Value2 + 290
Range("k127").Value2 = Range("k127").Value2 + 290
Range("k128").Value2 = Range("k128").Value2 + 290
Range("k129").Value2 = Range("k129").Value2 + 290
Range("k130").Value2 = Range("k130").Value2 + 290
Range("k131").Value2 = Range("k131").Value2 + 290
Range("k132").Value2 = Range("k132").Value2 + 290
Range("k133").Value2 = Range("k133").Value2 + 290
Range("k134").Value2 = Range("k134").Value2 + 290
For Each c In Worksheets("tbPARIS").Range("K2")
If c.Value >= 9800 Then
c.Value = 1000
End If
Next c
For Each c In Worksheets("tbPARIS").Range("K3")
If c.Value >= 9801 Then
c.Value = 1001
End If
Next c
Set SourceRange = Worksheets("tbPARIS").Range("k2:k3")
Set fillRange = Worksheets("tbPARIS").Range("k2:k200")
SourceRange.AutoFill Destination:=fillRange
ActiveWorkbook.Save
Dim acApp As New Access.Application
' Démarrer Access
Set acApp = New Access.Application
' Ouvrir la base de données concernée
acApp.OpenCurrentDatabase ("c:\Program Files\Pegase 4.0\baseCredit\BaseAgences.mdb")
DoEvents
DoEvents
DoEvents
DoEvents
DoCmd.TransferSpreadsheet acImport, 8, "tblEtiquette", "c:\Program Files\Pegase 4.0\baseCredit\tbETIQUETAGENCES1.xls", True, "tbPARIS!A1:L200"
On Error Resume Next
DoCmd.SetWarnings False
DoCmd.DeleteObject acTable, "_ImportErrors"
DoCmd.SetWarnings True
' Quitter Access
acApp.Quit
DoEvents
DoEvents
DoEvents
DoEvents
DoEvents
DoEvents
Set acApp = Nothing
DoEvents
DoEvents
DoEvents
Worksheets("tbPARIS").Visible = False
Sheets("DEPART").Select
End Sub |
Partager