Results 1 to 18 of 18

Thread: Any Kinda Prog?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226

    Any Kinda Prog?

    I was just wondering if theres any kind of program where you can load a lsit and on the next line put the same word. SO you laod a lsit and on the next line after each word it puts 123456 not beside it or anything but on the next lin? Well thx for the help
    Thanks For The Help Guys

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226

    Re: Any Kinda Prog?

    Or would it be hard to code one real fast? Thanks
    Thanks For The Help Guys

  3. #3
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    you can just use instr() and a listbox

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226
    Thanks for replying do you or anyone else have some code or an example on how to do this? I appreciate it thanks
    Thanks For The Help Guys

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226
    Id really apprecaite some help here guys ...thanks
    Thanks For The Help Guys

  6. #6
    Frenzied Member TomGibbons's Avatar
    Join Date
    Feb 2002
    Location
    San Diego, CA Previous Location: UK
    Posts
    1,345
    Im not even sure what you are trying to do here. Can you try to explain?

  7. #7
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Ditto what Tom said... we need more info... your description is foggy as hell...
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226
    Ok well mushroom knew but ok what I want to do is load a list to a list box like:
    Item1-Abby
    Item2-Aaron
    Item3-Brian
    and so on 1 word per line and when I load it in either the load event or on a seperate command button I want it to like double space the words and in between the words on the double spaced line put the word 123456 after each word on the next line? Well if u dont get something tell me what ya dont get and ill try really hard to do better well thanks guys
    Last edited by _Vb_N00bie_; Feb 4th, 2003 at 05:03 PM.
    Thanks For The Help Guys

  9. #9
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    well

    No one can read what the hey you're typing!
    Please correct your typing errors before you post, that'll make it a lot easier for anybody else!

    Cheers!
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226
    Ya ok sorry I always type really fast then go over for mistakes but forgot to so sorry but I edited it
    Thanks For The Help Guys

  11. #11
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    well

    so you want you output to be:

    Item1
    Abby
    Item2
    Brian

    and so on ?
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226
    Ok I want to load a list we'll say with numbers 0-1000 so it would be 1000 lines. And after each number I want to place the word "Hello" after each number so it would be
    0
    Hello
    1
    Hello
    2
    Hello
    3
    Hello
    and so on with the word hello after each word in the list box(Will be 2000 lines when finished)... Any help/ideas will do and be much appreciated
    Thanks For The Help Guys

  13. #13
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    well

    try this:
    VB Code:
    1. Open ("C:\MyList.txt") For Input As #1
    2. Do Until EOF(1)
    3. Line Input #1, Data
    4. List1.AddItem Data
    5. List1.AddItem "Hello"
    6. Loop
    7. Close #1

    Is this what you want !?'

    Cheers
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226

    Re: well

    Originally posted by vbNeo
    try this:
    VB Code:
    1. Open ("C:\MyList.txt") For Input As #1
    2. Do Until EOF(1)
    3. Line Input #1, Data
    4. List1.AddItem Data
    5. List1.AddItem "Hello"
    6. Loop
    7. Close #1

    Is this what you want !?'

    Cheers
    Well that code dont work vb dont recognize Line Input #1,Data ???Thx man
    Thanks For The Help Guys

  15. #15
    Hyperactive Member BrandonTurner's Avatar
    Join Date
    Sep 2001
    Location
    East Lansing, Michiagn
    Posts
    268
    Well, either you have a really old version of vb, or you need to declare it/ take out option explicit(sp?).

  16. #16
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    You have to declare the variable 'data', before you can use it. I'll guess you know how to do that.

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Location
    Vb Forums
    Posts
    226
    Originally posted by Mushroom Realm
    You have to declare the variable 'data', before you can use it. I'll guess you know how to do that.
    Yep I got everything to work great and thanks to everyone who helped out on this problem thanks
    Thanks For The Help Guys

  18. #18
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Whoops

    Forgot to declare Data, sorry
    VB Code:
    1. Dim Data As String ' :-)

    Cheers!
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width