pour gérer mes doublons dans ma table j'ai fait ça mais ça marche pas pouvez vous me dire ou est l'erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 ith Sheets("Remplissage") For Each cell In .Range("D3:D" & .Range("D65536").End(xlUp).Row) If Not cell = TextGDO Then Range("A" & num).Value = TextHTA Range("B" & num).Value = TextNom Range("C" & num).Value = TextExploit Range("D" & num).Value = TextGDO Range("E" & num).Value = Formulaire.ComboBoxPPI Range("F" & num).Value = TextPoste Range("G" & num).Value = TextCommune Range("H" & num).Value = Formulaire.ComboBoxModèle Range("I" & num).Value = Formulaire.ComboBoxConstructeur Range("J" & num).Value = Formulaire.ComboBoxTechnologie Range("K" & num).Value = Formulaire.ComboBoxTypeILD Range("L" & num).Value = Formulaire.ComboBoxAnnéeBatterie Range("M" & num).Value = TextCalibrePossible.Value Range("N" & num).Value = TextRéglageEffectif.Value Range("O" & num).Value = TextRéglagePréconisé.Value Range("P" & num).Value = Formulaire.ComboBoxDateControle Range("Q" & num).Value = Formulaire.ComboBoxAnnéeControleValise Range("R" & num).Value = TextGéocutil.Value Range("S" & num).Value = TextTerrain.Value Range("T" & num).Value = Formulaire.ComboBoxBatterie Range("U" & num).Value = Formulaire.ComboBoxPlatine Range("V" & num).Value = Formulaire.ComboBoxVoyant Range("W" & num).Value = Formulaire.ComboBoxTorres Range("X" & num).Value = Formulaire.ComboBoxModificationSchémas Range("Y" & num).Value = TextContenuACR.Value Range("Z" & num).Value = TextActionVisite.Value Range("AA" & num).Value = TextActionUltérieurement.Value Range("AB" & num).Value = Formulaire.ComboBoxSiteOpérationnel Range("AC" & num).Value = Formulaire.ComboBoxRésultat Exit For Else Modif = MsgBox("cette personne est déjà référencée dans la base" & Chr(10) & Chr(10) & _ "Voulez-vous remplacer ces données ?", vbYesNo + vbQuestion, "Demande d'enregistrement") ' On remplace la somme et le commentaire If Modif = vbYes Then Range("A" & num).Value = TextHTA Range("B" & num).Value = TextNom Range("C" & num).Value = TextExploit Range("D" & num).Value = TextGDO Range("E" & num).Value = Formulaire.ComboBoxPPI Range("F" & num).Value = TextPoste Range("G" & num).Value = TextCommune Range("H" & num).Value = Formulaire.ComboBoxModèle Range("I" & num).Value = Formulaire.ComboBoxConstructeur Range("J" & num).Value = Formulaire.ComboBoxTechnologie Range("K" & num).Value = Formulaire.ComboBoxTypeILD Range("L" & num).Value = Formulaire.ComboBoxAnnéeBatterie Range("M" & num).Value = TextCalibrePossible.Value Range("N" & num).Value = TextRéglageEffectif.Value Range("O" & num).Value = TextRéglagePréconisé.Value Range("P" & num).Value = Formulaire.ComboBoxDateControle Range("Q" & num).Value = Formulaire.ComboBoxAnnéeControleValise Range("R" & num).Value = TextGéocutil.Value Range("S" & num).Value = TextTerrain.Value Range("T" & num).Value = Formulaire.ComboBoxBatterie Range("U" & num).Value = Formulaire.ComboBoxPlatine Range("V" & num).Value = Formulaire.ComboBoxVoyant Range("W" & num).Value = Formulaire.ComboBoxTorres Range("X" & num).Value = Formulaire.ComboBoxModificationSchémas Range("Y" & num).Value = TextContenuACR.Value Range("Z" & num).Value = TextActionVisite.Value Range("AA" & num).Value = TextActionUltérieurement.Value Range("AB" & num).Value = Formulaire.ComboBoxSiteOpérationnel Range("AC" & num).Value = Formulaire.ComboBoxRésultat Exit For End If If Modif = vbNo Then Exit For End If End If Next End With
Partager