DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Data Swap between ListBox's

  1. #1
    Join Date
    Feb 2007
    Posts
    8

    Data Swap between ListBox's

    Hey, im working on a program for my Linkshell in FFXI. I'm trying to make Members & Attendance listbox that allows the user to select multiple Members from the Member listbox on the left and put them onto the Attendance lisbox.

    I was able to make it so they can add 1 name at a time, but being able to select multiple names and hitting "add" once would be nice.

    Here is a Screenshot of what I have so far. The attendance section im working on is the top left.


  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Code:
    Private Sub btnAdd_Click()
    
        Dim I As Integer
        ' Step backward through list, so that we can
        ' remove items without throwing off the count
        For I = lstMembers.ListCount - 1 To 0 Step -1
            ' If item is selected...
            If lstMembers.Selected(I) Then
                ' Copy to top of attendance list
                lstAttendance.AddItem lstMembers.List(I), 0
                ' Remove from members list
                lstMembers.RemoveItem I
            End If
        Next
    
    End Sub
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Feb 2007
    Posts
    8
    Hey thanks a bunch this works great now ^^.

Similar Threads

  1. Create multiple data in data report
    By helme_syahiemie in forum VB Classic
    Replies: 1
    Last Post: 04-06-2006, 08:39 PM
  2. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM
  3. Replies: 0
    Last Post: 07-22-2000, 04:07 AM
  4. Unbound Data Report Recordset
    By Dale in forum VB Classic
    Replies: 1
    Last Post: 06-21-2000, 06:44 PM
  5. DataGrid - Enter data in a cell at run time
    By William Gaddam in forum VB Classic
    Replies: 1
    Last Post: 05-02-2000, 09:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center