bonsoir,
j'ai un souci avec mon userform :
Private Sub UserForm_Initialize()
Set f = Sheets("PLATS")
Set Rng = f.Range("A2:R" & f.[a65000].End(xlUp).Row)
BD = Rng.Value
ncol = 11
ListBox1.List = BD
ListBox1.ColumnCount = 18
ListBox1.ColumnWidths = "0;0;0;0;150;80;80;60;40;0;0;0;0;0;0;0;0;0"
Set f3 = Sheets("STOCK")
TblBD2 = Range("AB2:AC" & [a65000].End(xlDown).Row).Value
choix2 = Application.Transpose(f3.Range("AB2:AB" & f3.[AB65000].End(xlUp).Row).Value)
Me.ComboBox1.List = choix2
Call Tri(choix2, LBound(choix2), UBound(choix2))
Me.ComboBox1.List = choix2
End Sub
si la plage AB2:AB contient une seule valeur l'userform renvoie moi incompatibilité de type s'il ya 2 valeurs et plus l'userform s'ouvre correctement.
je veux aussi apres que userform1 s'ouvre correctement le combobox1 soit intuitif si je tape une lettre il cherche tout les mots qui commence par cette lettre.
merci d'avance
j'ai un souci avec mon userform :
Private Sub UserForm_Initialize()
Set f = Sheets("PLATS")
Set Rng = f.Range("A2:R" & f.[a65000].End(xlUp).Row)
BD = Rng.Value
ncol = 11
ListBox1.List = BD
ListBox1.ColumnCount = 18
ListBox1.ColumnWidths = "0;0;0;0;150;80;80;60;40;0;0;0;0;0;0;0;0;0"
Set f3 = Sheets("STOCK")
TblBD2 = Range("AB2:AC" & [a65000].End(xlDown).Row).Value
choix2 = Application.Transpose(f3.Range("AB2:AB" & f3.[AB65000].End(xlUp).Row).Value)
Me.ComboBox1.List = choix2
Call Tri(choix2, LBound(choix2), UBound(choix2))
Me.ComboBox1.List = choix2
End Sub
si la plage AB2:AB contient une seule valeur l'userform renvoie moi incompatibilité de type s'il ya 2 valeurs et plus l'userform s'ouvre correctement.
je veux aussi apres que userform1 s'ouvre correctement le combobox1 soit intuitif si je tape une lettre il cherche tout les mots qui commence par cette lettre.
merci d'avance