Computing.Net > Forums > Programming > VB6 - input file!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB6 - input file!

Reply to Message Icon

Name: BlackFoxxg
Date: April 24, 2009 at 04:14:58 Pacific
OS: Windows XP
Subcategory: General
Comment:

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!



Sponsored Link
Ads by Google

Response Number 1
Name: andynet
Date: April 26, 2009 at 13:25:52 Pacific
Reply:

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.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB6 - input file!

VB6 - Reading File Error www.computing.net/answers/programming/vb6-reading-file-error/8322.html

vb6 and file associations www.computing.net/answers/programming/vb6-and-file-associations/7159.html

input/output file...which is which? www.computing.net/answers/programming/inputoutput-filewhich-is-which/8599.html