VB6 - input file!

April 24, 2009 at 04:14:58
Specs: Windows XP
now i'm having a problem with Visual Baisc 6. I have a text file "file.txt" and i want to input that file into my code. The problem is i just want to input only one line from that file. For example: I have a variable is "phrase" (Dim phrase as string) now i want to input that "file.txt" and set Phrase = phraseinput ( phraseinput is one line from "file.txt"). More specific, "file.txt" contains some phrases such as "rock music", "hip hop music" .etc, now i want to set "phrase = rockmusic" or "phrase = hip hop music"....etc - so how can i do it! Thanks for helps. I tried but it just input the whole file and i can't set my "phrase" = "rock music" or "hip hop music" ever!

See More: VB6 - input file!

Report •

April 26, 2009 at 13:25:52
You can try instr this will find charcters or words within text although you may have more than one instance of the word you are looking for and get the wrong line.

Report •
Related Solutions

Ask Question