I need to loop items of combobox from the clicked item to the top of list...
example in combobox1:
30/09/2011
29/09/2011
28/09/2011
27/09/2011
26/09/2011
23/09/2011
22/09/2011
21/09/2011
20/09/2011
19/09/2011
16/09/2011
15/09/2011
14/09/2011
13/09/2011
12/09/2011
...
09/09/2011
if i click on item 27/09/2011 and after loop i need:
28/09/2011
29/09/2011
30/09/2011
loop items in cpombobox from the clicked to the top of list
-
- PlatinumLounger
- Posts: 4362
- Joined: 26 Apr 2010, 17:36
-
- NewLounger
- Posts: 12
- Joined: 08 Feb 2010, 17:19
- Location: Rotterdam, NY
Re: loop items in cpombobox from the clicked to the top of l
try this
For indx = Me.YourComboboxName.ListIndex To 0 Step -1
Debug.Print Me.YourComboboxName.Column(1, indx) ' Your code here
Next indx
For indx = Me.YourComboboxName.ListIndex To 0 Step -1
Debug.Print Me.YourComboboxName.Column(1, indx) ' Your code here
Next indx
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: loop items in cpombobox from the clicked to the top of l
Sal, did djlansing's reply solve your problem?
Best wishes,
Hans
Hans