Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

VB 6.0 adding two lists together question


  • Please log in to reply

#1
nate0wnsy0u

nate0wnsy0u

    New Member

  • Member
  • Pip
  • 2 posts
Alright so i thought i knew how to do this, but it didn't work and i could really use some help. I need to add list1 and list2 together, with a character in the middle like ":" or something. I need them added together so that the item on the first line of list1 is then with the first item of list2 in a new list, we'll call "list3". With perhaps a ":" or something seperating the old list1 from old list2. (Sorry if i gave bad details/description of what i need... if you'd like more info my IM is timing, and my msn is [email protected]) Thanks alot guys. :tazz:
  • 0

Advertisements


#2
FrOzeN

FrOzeN

    New Member

  • Member
  • Pip
  • 6 posts
So each item from List1 next to each item from List2 seperated by ":" in List3?
List1 and List2 have the same ammount of items right?

Try:
 Dim i As Integer
    For i = 1 To List1.ListCount
        List3.AddItem List1.List(i - 1) & ":" & List2.List(i - 1)
    Next i

  • 0

#3
nate0wnsy0u

nate0wnsy0u

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts
o.o yep, thanks dude... i knew it was something like that but i was having a brain freeze. :tazz: thanks
  • 0

#4
TwiztidNinja

TwiztidNinja

    Member

  • Member
  • PipPip
  • 51 posts
lol i woulda ended up addint it to an array and then put in the list box cause i never would have thought of that
  • 0

#5
intraaction

intraaction

    Member

  • Member
  • PipPip
  • 15 posts
FrOzeN is perfact
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP