Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help in figuring out how to read from a text file

Status
Not open for further replies.

bigwilly

Technical User
Nov 23, 2000
2
US
I need help in figuring out how to read from a text file. Two types of text files in particular. Just a standard word list, and also a comma delimited or seperated word list. I am making a hangman game and I want a random word to be generated using a text file. Any help that anyone could offer would be greatly appreciated. Thank You For Your Time.

Sincerely,
Billy Willis
 
What in particular do you need help with??

To read a text file, use the following:

Dim sLine As String
Dim lLineCount As Long
Open "C:\aa\aa.txt" For Input As #1
Do Until EOF(1)
lLineCount = lLineCount + 1
Line Input #1, sLine
'process the line
Loop
Close #1


Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top