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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
| Sub TEST1()
'
' TEST1 Macro
'
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Décalaration des variables
Dim Wk1 As Workbook 'doc où il y a la macro'
Dim Wk2 As Workbook 'doc fiche de synthèse'
Dim Wk3 As Workbook 'doc qui devra être importer sur TWIMM'
Dim fiche_de_synthèse As String
Dim fichier_à_importer As String
Dim dernligneWk2 As Integer 'dernière ligne de la colonne code_site, attention si ajout de colonne avant il faut modifier le n° de la colonne ici'
Dim derncolWk2 As Integer 'dernière colonne du tableau fiche de synthèse'
Dim derncolWk3 As Integer
Dim derncolWk3_2 As Integer
Dim derncolWk3_3 As Integer
Dim derncolWk3_4 As Integer
Dim derncolWk3_5 As Integer
Dim derncolWk3_6 As Integer
Dim i As Integer 'i représente la variable du nombre d'élément en Y'
Dim j As Integer 'j représente la variable du nombre d'élément en X'
Dim nom_col(44) As String 'dans le classeur fiche de synthèse'
Dim nom_colonne(44) As String 'dans le classeur IMPORT TWIMM'
Dim place_col(44) As Integer 'pour le fichier source Wk2'
Dim place_colonne_Wk3(44) As Integer 'pour le fichier Wk3'
Dim plage_donnees_Wk2 As Integer
Dim code_du_site() As String 'c'est les noms dans le tableau virtuel que l'on a créé'
Dim nom_du_site() As String
Dim lot_sur_le_site() As String
Dim designation() As String
Dim commentaire_sur_le_site() As String
Dim adresse_1_site() As String
Dim adresse_2_site() As String
Dim code_postal_site() As String
Dim ville_du_site() As String
Dim code_titre() As String
Dim observation_sur_le_site() As String
Dim code_client() As String
Dim nom_client() As String
Dim groupe_du_client() As String
Dim adresse_1_client() As String
Dim adresse_2_client() As String
Dim code_postal_client() As String
Dim ville_client() As String
Dim dirigeant() As String
Dim tel_client() As String
Dim mail_client() As String
Dim fax_client() As String
Dim code_du_contact() As String
Dim nom_du_contact() As String
Dim type_contact() As String
Dim tel1_du_contact() As String
Dim tel2_du_contact() As String
Dim mail_du_contact() As String
Dim notifications_par_rapport_au_contact() As String
Dim code_secteur() As String
Dim code_tech() As String
Dim numero_contrat() As String
Dim intitule_du_contrat() As String
Dim date_debut_contrat() As String
Dim reconduction_du_contrat() As String
Dim base_contrat() As String
Dim BI_facturable() As String
Dim observations_sur_contrat() As String
Dim prevision_temps() As String
Dim type_facturation() As String
Dim base_nb() As String
Dim base_DJU() As String
Dim code_station_meteo() As String
Dim surface() As String
'ici on indique où lire les chemins dans la feuille excel où il y a la macro'
Set Wk1 = ThisWorkbook
fiche_de_synthèse = Wk1.Sheets(1).Range("E3")
fichier_à_importer = Wk1.Sheets(1).Range("E6")
Set Wk2 = Workbooks.Open(fiche_de_synthèse)
Set Wk3 = Workbooks.Open(fichier_à_importer)
'définition des bornes du tableau source'
dernligneWk2 = Wk2.Sheets("Fiche de synthèse").Range("B" & Rows.Count).End(xlUp).Row 'prend la valeur de la dernière ligne de la colonne C (CODE_SITE)'
derncolWk2 = Wk2.Sheets("Fiche de synthèse").Cells(6, Cells.Columns.Count).End(xlToLeft).Column 'prend la valeur de la derniere colonne'
derncolWk3 = Wk3.Sheets("SITES").Cells(1, Cells.Columns.Count).End(xlToLeft).Column 'prend la valeur de la derniere colonne'
derncolWk3_2 = Wk3.Sheets("BâTIMENTS").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
derncolWk3_3 = Wk3.Sheets("CLIENTS").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
derncolWk3_4 = Wk3.Sheets("CONTACTS").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
derncolWk3_5 = Wk3.Sheets("TECHNICIEN - SITE").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
derncolWk3_6 = Wk3.Sheets("CONTRATS P2").Cells(1, Cells.Columns.Count).End(xlToLeft).Column
'création des vecteurs noms colonnes, attention les noms ne doivent pas changer'
'dans le classeur FICHE DE SYNTHESE'
nom_col(1) = "CODE_SITE"
nom_col(2) = "NOM_S"
nom_col(3) = "LOTS"
nom_col(4) = "DESIGNATION"
nom_col(5) = "COMMENTAIRE"
nom_col(6) = "ADR1_S"
nom_col(7) = "ADR2_S"
nom_col(8) = "CP_S"
nom_col(9) = "VILLE_S"
nom_col(10) = "CODE_TITRE"
nom_col(11) = "OBSERVATIONS"
nom_col(12) = "CODE_CLIENT"
nom_col(13) = "NOM_C"
nom_col(14) = "GROUPE"
nom_col(15) = "ADR1_C"
nom_col(16) = "ADR2_C"
nom_col(17) = "CP_C"
nom_col(18) = "VILLE_C"
nom_col(19) = "DIRIGEANT"
nom_col(20) = "TEL_CLIENT"
nom_col(21) = "Mail"
nom_col(22) = "Fax"
nom_col(23) = "CODE_CONTACT"
nom_col(24) = "NOM2"
nom_col(25) = "TYPE_CONTACT"
nom_col(26) = "TEL1"
nom_col(27) = "TEL2"
nom_col(28) = "MAIL2"
nom_col(29) = "NOTIFICATIONS"
nom_col(30) = "CODE_SECTEUR"
nom_col(31) = "CODE_TECH"
nom_col(32) = "NUMERO_CONTRAT"
nom_col(33) = "INTITULE"
nom_col(34) = "DATE_DEBUT"
nom_col(35) = "RECONDUCTION"
nom_col(36) = "BASE_CONTRAT"
nom_col(37) = "BI_FACTURABLE"
nom_col(38) = "OBSERVATIONS2"
nom_col(39) = "PREVISION_TEMPS"
nom_col(40) = "TYPE_FACTURATION"
nom_col(41) = "BASE_NB"
nom_col(42) = "BASE_DJU"
nom_col(43) = "CODE_STATION_METEO"
nom_col(44) = "SURFACE"
'création des vecteurs noms colonnes, attention les noms ne doivent pas changer'
'dans le classeur IMPORT TWIMM'
nom_colonne(1) = "CODE_SITE"
nom_colonne(2) = "NOM"
nom_colonne(3) = "LOTS"
nom_colonne(4) = "DESIGNATION"
nom_colonne(5) = "COMMENTAIRE"
nom_colonne(6) = "ADR1"
nom_colonne(7) = "ADR2"
nom_colonne(8) = "CP"
nom_colonne(9) = "VILLE"
nom_colonne(10) = "CODE_TITRE"
nom_colonne(11) = "OBSERVATIONS"
nom_colonne(12) = "CODE_CLIENT"
nom_colonne(13) = "NOM"
nom_colonne(14) = "GROUPE"
nom_colonne(15) = "ADR1"
nom_colonne(16) = "ADR2"
nom_colonne(17) = "CP"
nom_colonne(18) = "VILLE"
nom_colonne(19) = "DIRIGEANT"
nom_colonne(20) = "TEL"
nom_colonne(21) = "MAIL"
nom_colonne(22) = "FAX"
nom_colonne(23) = "CODE_CONTACT"
nom_colonne(24) = "NOM"
nom_colonne(25) = "TYPE_CONTACT"
nom_colonne(26) = "TEL1"
nom_colonne(27) = "TEL2"
nom_colonne(28) = "MAIL"
nom_colonne(29) = "NOTIFICATIONS"
nom_colonne(30) = "CODE_SECTEUR" 'vérifier'
nom_colonne(31) = "CODE_TECH"
nom_colonne(32) = "NUMERO_CONTRAT"
nom_colonne(33) = "INTITULE"
nom_colonne(34) = "DATE_DEBUT"
nom_colonne(35) = "RECONDUCTION"
nom_colonne(36) = "BASE_CONTRAT"
nom_colonne(37) = "BI_FACTURABLE"
nom_colonne(38) = "OBSERVATIONS"
nom_colonne(39) = "PREVISION_TEMPS"
nom_colonne(40) = "TYPE_FACTURATION"
nom_colonne(41) = "BASE_NB"
nom_colonne(42) = "BASE_DJU"
nom_colonne(43) = "CODE_STATION_METEO"
nom_colonne(44) = "SURFACE"
'on commence la lecture dans le classeur fiche de synthèse (Wk2), en localisant les info à traiter par lecture du nom des colonnes'
For i = 1 To UBound(nom_col, 1)
For j = 1 To derncolWk2
If UCase(nom_col(i)) Like "*" & UCase(Wk2.Sheets("fiche de synthèse").Cells(6, j)) & "*" And UCase(Wk2.Sheets("fiche de synthèse").Cells(6, j)) <> "" Then
place_col(i) = j
Exit For
Else
End If
Next
Next
For i = 1 To UBound(nom_colonne, 1)
For j = 1 To derncolWk3
If UCase(nom_colonne(i)) Like "*" & UCase(Wk3.Sheets("SITES").Cells(1, j)) & "*" And UCase(Wk3.Sheets("SITES").Cells(1, j)) <> "" Then
place_colonne_Wk3(i) = j
Exit For
Else
End If
Next
Next
For i = 1 To UBound(nom_colonne, 1)
For j = 1 To derncolWk3_2
If UCase(nom_colonne(i)) Like "*" & UCase(Wk3.Sheets("BâTIMENTS").Cells(1, j)) & "*" And UCase(Wk3.Sheets("BâTIMENTS").Cells(1, j)) <> "" Then
place_colonne_Wk3(i) = j
Exit For
Else
End If
Next
Next
For i = 1 To UBound(nom_colonne, 1)
For j = 1 To derncolWk3_3
If UCase(nom_colonne(i)) Like "*" & UCase(Wk3.Sheets("CLIENTS").Cells(1, j)) & "*" And UCase(Wk3.Sheets("CLIENTS").Cells(1, j)) <> "" Then
place_colonne_Wk3(i) = j
Exit For
Else
End If
Next
Next
For i = 1 To UBound(nom_colonne, 1)
For j = 1 To derncolWk3_4
If UCase(nom_colonne(i)) Like "*" & UCase(Wk3.Sheets("CONTACTS").Cells(1, j)) & "*" And UCase(Wk3.Sheets("CONTACTS").Cells(1, j)) <> "" Then
place_colonne_Wk3(i) = j
Exit For
Else
End If
Next
Next
For i = 1 To UBound(nom_colonne, 1)
For j = 1 To derncolWk3_5
If UCase(nom_colonne(i)) Like "*" & UCase(Wk3.Sheets("TECHNICIEN - SITE").Cells(1, j)) & "*" And UCase(Wk3.Sheets("TECHNICIEN - SITE").Cells(1, j)) <> "" Then
place_colonne_Wk3(i) = j
Exit For
Else
End If
Next
Next
For i = 1 To UBound(nom_colonne, 1)
For j = 1 To derncolWk3_6
If UCase(nom_colonne(i)) Like "*" & UCase(Wk3.Sheets("CONTRATS P2").Cells(1, j)) & "*" And UCase(Wk3.Sheets("CONTRATS P2").Cells(1, j)) <> "" Then
place_colonne_Wk3(i) = j
Exit For
Else
End If
Next
Next
'code_du_site et les autres doivent être dimensionnés'
ReDim code_du_site(dernligneWk2 - 6) '1
ReDim nom_du_site(dernligneWk2 - 6) '2
ReDim lot_sur_le_site(dernligneWk2 - 6) '3
ReDim designation(dernligneWk2 - 6) '4
ReDim commentaire_sur_le_site(dernligneWk2 - 6) '5
ReDim adresse_1_site(dernligneWk2 - 6) '6
ReDim adresse_2_site(dernligneWk2 - 6) '7
ReDim code_postal_site(dernligneWk2 - 6) '8
ReDim ville_du_site(dernligneWk2 - 6) '9
ReDim code_titre(dernligneWk2 - 6) '10
ReDim observation_sur_le_site(dernligneWk2 - 6) '11
ReDim code_client(dernligneWk2 - 6) '12
ReDim nom_client(dernligneWk2 - 6) '13
ReDim groupe_du_client(dernligneWk2 - 6) '14
ReDim adresse_1_client(dernligneWk2 - 6) '15
ReDim adresse_2_client(dernligneWk2 - 6) '16
ReDim code_postal_client(dernligneWk2 - 6) '17
ReDim ville_client(dernligneWk2 - 6) '18
ReDim dirigeant(dernligneWk2 - 6) '19
ReDim tel_client(dernligneWk2 - 6) '20
ReDim mail_client(dernligneWk2 - 6) '21
ReDim fax_client(dernligneWk2 - 6) '22
ReDim code_du_contact(dernligneWk2 - 6) '23
ReDim nom_du_contact(dernligneWk2 - 6) '24
ReDim type_contact(dernligneWk2 - 6) '25
ReDim tel1_du_contact(dernligneWk2 - 6) '26
ReDim tel2_du_contact(dernligneWk2 - 6) '27
ReDim mail_du_contact(dernligneWk2 - 6) '28
ReDim notifications_par_rapport_au_contact(dernligneWk2 - 6) '29
ReDim code_secteur(dernligneWk2 - 6) '30
ReDim code_tech(dernligneWk2 - 6) '31
ReDim numero_contrat(dernligneWk2 - 6) '32
ReDim intitule_du_contrat(dernligneWk2 - 6) '33
ReDim date_debut_contrat(dernligneWk2 - 6) '34
ReDim reconduction_du_contrat(dernligneWk2 - 6) '35
ReDim base_contrat(dernligneWk2 - 6) '36
ReDim BI_facturable(dernligneWk2 - 6) '37
ReDim observations_sur_contrat(dernligneWk2 - 6) '38
ReDim prevision_temps(dernligneWk2 - 6) '39
ReDim type_facturation(dernligneWk2 - 6) '40
ReDim base_nb(dernligneWk2 - 6) '41
ReDim base_DJU(dernligneWk2 - 6) '42
ReDim code_station_meteo(dernligneWk2 - 6) '43
ReDim surface(dernligneWk2 - 6) '44
'on récupère les données du classeur fiche de synthèse'
For i = 1 To dernligneWk2 - 6
'on créer des variables temporaires dans la macro'
code_du_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(1))
nom_du_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(2))
lot_sur_le_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(3))
designation(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(4))
commentaire_sur_le_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(5))
adresse_1_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(6))
adresse_2_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(7))
code_postal_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(8))
ville_du_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(9))
code_titre(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(10))
observation_sur_le_site(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(11))
code_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(12))
nom_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(13))
groupe_du_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(14))
adresse_1_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(15))
adresse_2_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(16))
code_postal_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(17))
ville_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(18))
dirigeant(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(19))
tel_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(20))
mail_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(21))
fax_client(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(22))
code_du_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(23))
nom_du_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(24))
type_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(25))
tel1_du_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(26))
tel2_du_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(27))
mail_du_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(28))
notifications_par_rapport_au_contact(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(29))
code_secteur(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(30))
code_tech(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(31))
numero_contrat(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(32))
intitule_du_contrat(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(33))
date_debut_contrat(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(34))
reconduction_du_contrat(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(35))
base_contrat(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(36))
BI_facturable(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(37))
observations_sur_contrat(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(38))
prevision_temps(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(39))
type_facturation(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(40))
base_nb(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(41))
base_DJU(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(42))
code_station_meteo(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(43))
surface(i) = Wk2.Sheets("fiche de synthèse").Cells(i + 6, place_col(44))
Next
'on colle les valeurs qui sont stockées dans les variables temporaires dans le fichier à importer sur TWIMM'
'pour mieux s'y retrouver et plus de facilité, on colle page par page'
For i = 1 To dernligneWk2 - 6
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(1)) = code_du_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(2)) = nom_du_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(3)) = lot_sur_le_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(6)) = adresse_1_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(7)) = adresse_2_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(8)) = code_postal_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(9)) = ville_du_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(10)) = code_titre(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(11)) = observation_sur_le_site(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(12)) = code_client(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(30)) = code_secteur(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(37)) = BI_facturable(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(41)) = base_nb(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(42)) = base_DJU(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(43)) = code_station_meteo(i)
Wk3.Sheets("SITES").Cells(i + 1, place_colonne_Wk3(44)) = surface(i)
Wk3.Sheets("BâTIMENTS").Cells(i + 1, place_colonne_Wk3(1)) = code_du_site(i)
Wk3.Sheets("BâTIMENTS").Cells(i + 1, place_colonne_Wk3(4)) = designation(i)
Wk3.Sheets("BâTIMENTS").Cells(i + 1, place_colonne_Wk3(5)) = commentaire_sur_le_site(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(12)) = code_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(13)) = nom_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(14)) = groupe_du_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(15)) = adresse_1_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(16)) = adresse_2_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(17)) = code_postal_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(18)) = ville_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(19)) = dirigeant(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(20)) = tel_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(21)) = mail_client(i)
Wk3.Sheets("CLIENTS").Cells(i + 1, place_colonne_Wk3(22)) = fax_client(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(23)) = code_du_contact(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(24)) = nom_du_contact(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(25)) = type_contact(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(26)) = tel1_du_contact(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(27)) = tel2_du_contact(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(28)) = mail_du_contact(i)
Wk3.Sheets("CONTACTS").Cells(i + 1, place_colonne_Wk3(29)) = notifications_par_rapport_au_contact(i)
Wk3.Sheets("TECHNICIEN - SITE").Cells(i + 1, place_colonne_Wk3(31)) = code_tech(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(32)) = numero_contrat(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(33)) = intitule_du_contrat(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(34)) = date_debut_contrat(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(35)) = reconduction_du_contrat(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(36)) = base_contrat(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(38)) = observations_sur_contrat(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(39)) = prevision_temps(i)
Wk3.Sheets("CONTRATS P2").Cells(i + 1, place_colonne_Wk3(40)) = type_facturation(i)
Next
Application.ScreenUpdating = True
End Sub |
Partager