Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Populating listbox with only one data

I have to listbox controls. This form allows you to move data from one
listbox to the other


ListBox ADDBUTTON - Listbox2

If you can imagine the above when you hit the ADDBUTTON it should move
one of the rows from the left listbox to the right one. I just want
one piece of data to move over . Is there a parameter to do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Populating listbox with only one data

This is the event handler for AddButton upon click:

Private Sub AddButton_Click()
If ListBox1.ListIndex = -1 Then Exit Sub
For i = 0 to ListBox2.ListCount - 1
If ListBox1.Value = ListBox2.List(i) Then
Exit Sub
End If
Next i
ListBox2.AddItem ListBox1.Value
End Sub

" wrote:

I have to listbox controls. This form allows you to move data from one
listbox to the other


ListBox ADDBUTTON - Listbox2

If you can imagine the above when you hit the ADDBUTTON it should move
one of the rows from the left listbox to the right one. I just want
one piece of data to move over . Is there a parameter to do this?


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
Populating listbox Mick[_2_] Excel Discussion (Misc queries) 1 May 14th 08 10:48 PM
populating a listbox enyaw Excel Programming 3 November 28th 06 06:48 AM
Populating listbox Andy Brown Excel Programming 3 August 16th 04 05:40 PM
Populating a ListBox ToddG Excel Programming 1 June 24th 04 03:18 AM
Populating combobox/listbox Torstein S. Johnsen[_2_] Excel Programming 1 May 13th 04 09:26 AM


All times are GMT +1. The time now is 03:53 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"