|
-
Jan 5th, 2010, 01:58 PM
#15
Thread Starter
Fanatic Member
Re: Randomly Selecting Text File Number, Selecting Line, and Retrieving Part of a Lin
I removed the "rand" from the code, and I ran the code, and I still show the number "0" in the SetCluePW area (remember, this is for testing purposes only).
Here is the updated code:
Code:
Public Sub GetR1Puzzle()
Dim i As Integer
i = Rnd * File1.ListCount
For i = 0 To 210
PWpuzzle(i) = PWpuzzle(i)
Open App.Path & "\puzzles\puzzle" & (Trim(Val(i))) & ".txt" For Input As 1
Close
Next
FirstClue1
End Sub
If i is supposed to determine the file number to be selected at random, why do I get a zero as a result? How do I get the file number within range (from 0 to 210)?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|