Bonjour à tous,

hier d'une minute à l'autre j'ai perdu 50% des fonctionnalités d'une application assez basique... (3ème partie du code HS)

Ce matin c'est 90% !? (2ème partie du code HS en plus)

Quelqu'un pourrait il m'éclairer?

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
 
Dim tab_article() 'Déclaration de tableaux dynamiques
Dim tab_references()
 
 
' alimenter la liste des articles contenus dans le fichier : 1 onglet = 1 article
Private Sub TextBox1_Change()
ListBox1.Clear ' vider la listbox
For i = 1 To Worksheets.Count 'pour chaque feuille
    If InStr(1, Worksheets(i).Name, Me.TextBox1.Value, vbTextCompare) > 0 Then
        ListBox1.AddItem Worksheets(i).Name ' ajouter son nom à la listbox
    End If
Next i
End Sub
 
'sélectionneer un article et renseigner les champs de l'article sélectionné
Private Sub ListBox1_Click()
'Application.ScreenUpdating = False
Me.TextBox1 = ListBox1.Value
 
derniere_ligne = Range("A1").End(xlDown).Row 'Dernière ligne de la base de données
 
    ReDim tab_article(derniere_ligne - 1, 4) 'choix du nombre de colonnes
 
    'Enregistrement des valeurs dans le tableau
    Set fr = Sheets(Me.TextBox1.Value)
    For i = 1 To derniere_ligne - 1
        tab_article(i, 0) = fr.Range("J" & i + 1)
        tab_article(i, 1) = fr.Range("K" & i + 1)
        tab_article(i, 2) = fr.Range("W" & i + 1)
        tab_article(i, 3) = fr.Range("Y" & i + 1)
        tab_article(i, 4) = fr.Range("Z" & i + 1)
    Next i
 
    'Définit le nombre de colonnes pour la ListBox.
    ListBox2.ColumnCount = UBound(tab_article)
    'Chargement du tableau dans la ListBox
    ListBox2.List() = tab_article()
 
  ReDim tab_references(derniere_ligne - 1, 3) 'choix du nombre de colonnes
  For i = 0 To ListBox2.ListCount - 1
    Set fr = Sheets("References 2019")
        For r = 4 To fr.[F65000].End(xlUp).Row
            If fr.Range("C" & r) = ListBox2.Column(0, i) Then
                tab_references(i, 0) = fr.Range("C" & r)
                tab_references(i, 1) = fr.Range("O" & r)
                tab_references(i, 2) = fr.Range("V" & r)
                tab_references(i, 3) = fr.Range("Y" & r)
            End If
        Next r
  Next i
 
  'Définit le nombre de colonnes pour la ListBox.
  ListBox3.ColumnCount = UBound(tab_references)
  'Chargement du tableau dans la ListBox
  Me.ListBox3.List = tab_references()
Application.ScreenUpdating = True
End Sub