Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default move item in multiselect listbox

Good evening,

The code below, found in this group, works fine when
the multiselect listbox has 1 column, Struggling to
get it work when the listbox has 2 columns but without
success. Grateful for some hints.

Brgds

CG Rosen
------------------------------------------------------------
Private Sub SpinButton1_SpinUp()

If ListBox1.ListIndex < -1 Then
i = ListBox1.ListIndex
If i = 0 Then Exit Sub
s = ListBox1.List(i)
ListBox1.RemoveItem i
ListBox1.AddItem s, i - 1
ListBox1.ListIndex = i - 1
ListBox1.Selected(i - 1) = True
SpinButton1.Value = 0
End If

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default move item in multiselect listbox

There is some good basic information at this site:

http://support.microsoft.com/kb/829070





"CG Rosen" wrote in message
...
Good evening,

The code below, found in this group, works fine when
the multiselect listbox has 1 column, Struggling to
get it work when the listbox has 2 columns but without
success. Grateful for some hints.

Brgds

CG Rosen
------------------------------------------------------------
Private Sub SpinButton1_SpinUp()

If ListBox1.ListIndex < -1 Then
i = ListBox1.ListIndex
If i = 0 Then Exit Sub
s = ListBox1.List(i)
ListBox1.RemoveItem i
ListBox1.AddItem s, i - 1
ListBox1.ListIndex = i - 1
ListBox1.Selected(i - 1) = True
SpinButton1.Value = 0
End If

End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
move item from one listbox to another listbox steve Excel Programming 6 March 6th 08 05:02 PM
Double click item in Listbox to select item and close Listbox GusEvans Excel Programming 3 July 19th 07 12:36 PM
Multiselect Listbox - identify if item picked apndas[_12_] Excel Programming 5 July 27th 06 03:23 AM
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


All times are GMT +1. The time now is 11:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"