Results 1 to 10 of 10

Thread: Alphebetizing a text file :resolved

  1. #1

    Thread Starter
    Fanatic Member evexa's Avatar
    Join Date
    Apr 2003
    Location
    USA
    Posts
    609

    Alphebetizing a text file :resolved

    Is there a command in vb that can alphebetize entries (alphebetize the rows) in a text file?
    If so does anyone know how?
    Cheers again!
    Eve
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Last edited by evexa; Jul 21st, 2003 at 01:35 PM.
    Trust no one

    ----------------------------------------
    http://www.eccentrix.com/members/xeaudrey/exanegotium.html
    http://www.eccentrix.com/members/xeaudrey/

  2. #2
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    I never heard of a command..

    I think you would have to put it into a grid maybe..
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  3. #3

    Thread Starter
    Fanatic Member evexa's Avatar
    Join Date
    Apr 2003
    Location
    USA
    Posts
    609
    Originally posted by RudyL
    I never heard of a command..

    I think you would have to put it into a grid maybe..
    a grid in a text file?
    hm. how do you do that?
    Trust no one

    ----------------------------------------
    http://www.eccentrix.com/members/xeaudrey/exanegotium.html
    http://www.eccentrix.com/members/xeaudrey/

  4. #4
    Hyperactive Member deane034's Avatar
    Join Date
    May 2001
    Location
    Sri Lanka
    Posts
    485
    u want to name.. them.. Row A Row B?

    i guess u cud.. read them line by line.. and ad the string A .. B and so on.. incrementing... and.. write it back.. just.. sometin that camer up to my mind..
    me.life = VB

  5. #5

    Thread Starter
    Fanatic Member evexa's Avatar
    Join Date
    Apr 2003
    Location
    USA
    Posts
    609
    Originally posted by deane034
    u want to name.. them.. Row A Row B?

    i guess u cud.. read them line by line.. and ad the string A .. B and so on.. incrementing... and.. write it back.. just.. sometin that camer up to my mind..
    not sure if that would work/if i understand correctly.

    THe user inputs data that is passed to a text file
    then when the user presses a button each line ins alpabetized by the first letter in the line.
    Trust no one

    ----------------------------------------
    http://www.eccentrix.com/members/xeaudrey/exanegotium.html
    http://www.eccentrix.com/members/xeaudrey/

  6. #6
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    Like deane034 said..

    Read each line into a row. So you would have 1 column and x amount of rows depending on how many lines you have. Do the sort then write each row to the text file.

    Rudy
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  7. #7

    Thread Starter
    Fanatic Member evexa's Avatar
    Join Date
    Apr 2003
    Location
    USA
    Posts
    609
    Wow - I think its a little too complicated for me (im abit of a beginner) - thank you for your help though xxx
    Trust no one

    ----------------------------------------
    http://www.eccentrix.com/members/xeaudrey/exanegotium.html
    http://www.eccentrix.com/members/xeaudrey/

  8. #8
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    Yea, not ideal but I can't think of any other way to do it. Can you tell me what exactly the purpose/situation? Maybe if I knew more I could come up with a better solution.

    Rudy
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  9. #9

    Thread Starter
    Fanatic Member evexa's Avatar
    Join Date
    Apr 2003
    Location
    USA
    Posts
    609
    Originally posted by RudyL
    Yea, not ideal but I can't think of any other way to do it. Can you tell me what exactly the purpose/situation? Maybe if I knew more I could come up with a better solution.

    Rudy
    Well its for creating a report.
    The form has 5 text boxes

    the first 2 text boxes go on one line in a text file
    All the 5 boxes values go on one line in another text file

    The rows of the second text file are, on another form, loaded into a combo box which the user uses to select entries to go into a word file.

    oh wait - i can sort the combo box
    Thanks guys!!
    Trust no one

    ----------------------------------------
    http://www.eccentrix.com/members/xeaudrey/exanegotium.html
    http://www.eccentrix.com/members/xeaudrey/

  10. #10
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    There you go..

    Good luck
    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

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