LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default additem removeitem

Hi All,

Can't figure out why the following script won't remove selected items
properly:

With frm_map

Dim X As Integer
For X = 0 To .lst_map_prop_for_trans.ListCount - 1
On Error Resume Next
If .lst_map_prop_for_trans.Selected(X) = True Then
.lst_map_trans_to.AddItem .lst_map_prop_for_trans.List(X, 0)
.lst_map_trans_to.List(.lst_map_trans_to.ListCount - 1, 0) =
..lst_map_prop_for_trans.List(X, 0)
.lst_map_trans_to.List(.lst_map_trans_to.ListCount - 1, 1) =
..lst_map_prop_for_trans.List(X, 1)
.lst_map_trans_to.List(.lst_map_trans_to.ListCount - 1, 2) =
..lst_map_prop_for_trans.List(X, 2)
.lst_map_trans_to.List(.lst_map_trans_to.ListCount - 1, 3) =
..lst_map_prop_for_trans.List(X, 3)
.lst_map_prop_for_trans.RemoveItem (X)
End If

Next X
X = X + 1

End With

Other info: both listboxes are in separate frames (in the same form) and are
set to multiselect. The issue is that when I select one item to "transfer" it
works, but with two or more items selected the first or half of the items
selected will move, but not the second or second half of the items selected.

Any and all advice would be greatly appreciated.

Thank you.
 
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
Using RemoveItem with a combobox Dan Perkins Excel Programming 3 November 18th 06 12:08 PM
RemoveItem resetting Value in ComboBox Drummer361 Excel Programming 2 August 16th 06 06:53 PM
MSFlexGrid RemoveItem gti_jobert[_132_] Excel Programming 2 June 21st 06 11:30 AM
RemoveItem - ComboBox Mike Excel Programming 1 May 16th 06 04:51 PM
.additem Robert Couchman[_4_] Excel Programming 3 February 20th 04 02:47 PM


All times are GMT +1. The time now is 02:32 AM.

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

About Us

"It's about Microsoft Excel"