bonjour
voici mon probleme
lorsque je veux modifier ma ligne avec userform
ca me décale les colonne concerné et je ne vois pas pourquoi et comment faire
ets ce quelqu un peut m aider svp
cordialement
Version imprimable
bonjour
voici mon probleme
lorsque je veux modifier ma ligne avec userform
ca me décale les colonne concerné et je ne vois pas pourquoi et comment faire
ets ce quelqu un peut m aider svp
cordialement
Bonjour,
Si tu affichais ton code entre les balises prévues à cet effet, tu aurais plus de chance d'obtenir des réponses. Tous les intervenants n'ouvrent pas les classeurs joints
voici mon code
cordialement
Code:
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 Private Sub T1_Change() Dim i&, fin&, y&, a&, mem As Boolean Application.ScreenUpdating = 0 If mem1 Then Exit Sub If T1 = "" Then ListBox1.Clear: T2 = "": T3 = "": T4 = "": T5 = "": T6 = "": T7 = "": T8 = "": T9 = "": C3.Visible = 0: C4.Visible = 0: Exit Sub ListBox1.Clear With Feuil11 y = 1 fin = .Range("b" & Rows.Count).End(xlUp).Row aa = .Range("b6:q" & fin) End With For i = 2 To UBound(aa) aa(i, 16) = i + 5 Next i For i = 1 To UBound(aa) For a = 1 To UBound(aa, 2) If aa(i, a) Like "*" & T1 & "*" Then aa(i, 15) = "oui": y = y + 1: Exit For Next a Next i If y = 1 Then Exit Sub On Error Resume Next If y = 2 Then For i = 1 To UBound(aa) If aa(i, 15) = "oui" Then ListBox1.AddItem aa(i, 1) For a = 2 To UBound(aa, 2) ListBox1.List(ListBox1.ListCount - 1, a - 1) = aa(i, a) Controls("T" & a + 1) = aa(i, a): lig = aa(i, 16) Next a mem = 1: Exit For End If Next i Else ReDim bb(y - 1, UBound(aa, 2)) y = 1 For i = 1 To UBound(aa) If aa(i, 15) = "oui" Then For a = 1 To UBound(aa, 2) bb(y, a) = aa(i, a) Next a y = y + 1 End If Next i End If With ListBox1 .ColumnCount = 16 .ColumnWidths = "80;80;50;80;80;50;50;50;50;50;50;50;50;50;50;50;50" If mem Then Exit Sub .List = bb End With Application.ScreenUpdating = 1 End Sub Private Sub Userform_Initialize() C3.Visible = 0: C4.Visible = 0 End Sub
Bonsoir,
et avec en tête de module :
cela change-t-il quelque chose ?Code:
1
2 option base 1
Cordialement,
bonjour
merci pour taa reponse
mais j ai trouve la solution
cordialement
Bonjour,
Et la solution ne regarde pas les gens que tu interroges ?
bonjour
j avis oublier
mille excuses
j ai mis le chiffre 0 a la place de 1Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 Private Sub C4_Click() Dim i&, memo$ If ListBox1.ListIndex = -1 Then Exit Sub If lig = 0 Then lig = ListBox1.List(ListBox1.ListIndex, 15) With Feuil11 For i = 1 To 8 If IsNumeric(Controls("T" & i + 0)) Then Feuil11.Cells(lig, i) = Controls("T" & i + 0) * 1 Else Feuil11.Cells(lig, i) = Controls("T" & i + 0) End If Next i End With memo = T1 Unload MODIFIERSUPPRIMER MODIFIERSUPPRIMER.T1 = memo MODIFIERSUPPRIMER.Show End Sub
cordialement
Bonjour,
Dans ce cas, tu peux faire l'économie de l'addition parce-que i + 0 est égale à i donc ("T" & i) est préférable à ("T" & i + 0)
merci pour l info
cordialement