Bonjour,

Après multiples recherches je n'arrive pas à réparer mon fichier (qui est un fichier partagé avec + de 30 collaborateurs).
Il fonctionnait parfaitement bien depuis plusieurs mois et depuis un moment entre mercredi dernier et hier une erreur d'incompatibilité de type s'affiche à l'ouverture d'un formulaire (je fais une sauvegarde tous les mercredis de ce fichier c'est pourquoi je ne sais pas quand c'est arrivé exactement).
Mon fichier contenant uniquement des données confidentielles, je ne peux pas le transmettre en l'état.

Voici ce que j'ai dans mon userform_initialize :

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
Private Sub UserForm_Initialize()
 
    Me.CPM_Modif.List = [T_Cpm].Value
    Me.CDF_modif.List = [T_CDF].Value
    Me.CPC_modif.List = [T_CPC].Value
    Me.canal.List = [T_Canal].Value
 
 
Dim temp2()
  Dim c2 As Range
  Set MonDico2 = CreateObject("Scripting.Dictionary")
  For Each c2 In Range("T_Planning").ListObject.ListColumns("CPM").DataBodyRange
    If c2.Value <> "" Then MonDico2.Item(c2.Value) = c2.Value
  Next c2
  temp2 = MonDico2.items
  Call tri(temp2, LBound(temp2), UBound(temp2))
  Me.CPM.List = temp2
 
Dim temp()
  Dim c As Range
  Set MonDico = CreateObject("Scripting.Dictionary")
  For Each c In Range("T_Planning").ListObject.ListColumns("Nom du dossier").DataBodyRange
    If c.Value <> "" Then MonDico.Item(c.Value) = c.Value
  Next c
  temp = MonDico.items
  Call tri(temp, LBound(temp), UBound(temp))
  Me.Campagne.List = temp
 
Dim temp3()
  Dim c3 As Range
  Set MonDico3 = CreateObject("Scripting.Dictionary")
  For Each c3 In Range("T_Planning").ListObject.ListColumns("Identifiant ligne").DataBodyRange
    If c3.Value <> "" Then MonDico3.Item(c3.Value) = c3.Value
  Next c3
  temp3 = MonDico3.items
  Call tri(temp3, LBound(temp3), UBound(temp3))
  Me.identifiant_ligne.List = temp3
 
End Sub
J'ai vérifié mes noms de tableaux, de colonnes, de listes déroulantes, tout est ok.
Est-ce que le nombre d'items d'un dictionnaire est limité ?

Merci par avance pour votre aide précieuse !