Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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