'
---------------------------------------------------------------------------------------------
' PARTIE FORMULAIRE
'---------------------------------------------------------------------------------------------
Private Sub UserForm_Initialize()
init_form
End Sub
Private Sub CB_Beneficiaire_Change()
Dim Row_Design As Range
Dim Row_Categ As Range
CB_Beneficiaire.BackColor = RGB(255, 255, 255)
CB_Beneficiaire.Text = UCase(CB_Beneficiaire.Text)
Set Row_Design = Sheet_JDR.Range("I7:I" & Rows.Count).Find(CB_Beneficiaire, LookIn:=xlValues, LookAt:=xlWhole)
If Not Row_Design Is Nothing Then
Set Row_Categ = Sheet_Glossaire.Range("B5:B21").Find(Row_Design.Offset(, -3), LookIn:=xlValues, LookAt:=xlWhole)
If Not Row_Categ Is Nothing Then
CB_Categorie.Value = Row_Categ.Offset(, -1)
Else
CB_Categorie.Value = ""
End If
CB_Designation.Value = Row_Design.Offset(, 1)
Else
CB_Designation.Value = ""
End If
Update_ChargeFV
End Sub
Public Sub init_liste()
Dim Dico_Beneficiaires As Object
Dim Dico_Designation As Object
#If Mac Then
Set Dico_Beneficiaires = New Dictionary
Set Dico_Designation = New Dictionary
#Else
Set Dico_Beneficiaires = CreateObject("Scripting.Dictionary")
Set Dico_Designation = CreateObject("Scripting.Dictionary")
#End If
'Liste Beneficiaires
For Each c In Range([I7], [I999999].End(xlUp))
If Not Dico_Beneficiaires.Exists(c.Value) And c.Value <> "" Then Dico_Beneficiaires.Add c.Value, c.Value
Next c
CB_Beneficiaire.List = Dico_Beneficiaires.Items
'Liste Designation
For Each c In Range([J7], [J999999].End(xlUp))
If Not Dico_Designation.Exists(c.Value) And c.Value <> "" Then Dico_Designation.Add c.Value, c.Value
Next c
CB_Designation.List = Dico_Designation.Items
End Sub