Liste de choix

pouty

XLDnaute Junior
<< Bonjour,
<< J'ai une macro avec liste d'items sur une colonne et j'aurais besoin d'aide pour une liste sur 2 colonnes voici la macro :


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 1 And Target.Count = 1 Then
UserForm1.Top = Target.Top + 110 - Cells(ActiveWindow.ScrollRow, 1).Top
UserForm1.Left = 150
UserForm1.Show
End If
Cancel = True
End Sub

Private Sub CommandButton1_Click()
ActiveCell.Value = Me.ComboBox1
Unload Me
End Sub

Private Sub UserForm_Initialize()
Set mondico = CreateObject("Scripting.Dictionary")
For Each c In Range("A2:A" & [a65000].End(xlUp).Row)
mondico(c.Value) = c.Value
Next c
Me.ComboBox1.List = mondico.items
SendKeys "{F4}"
End Sub
 
Dernière édition:

Discussions similaires

Statistiques des forums

Discussions
312 495
Messages
2 088 969
Membres
103 993
dernier inscrit
Essens