Hi Thank you for your quick reply here is another
piece of code that i used in a previous program this code loads a file for reading and also i found it useful for my card game - why did they have to change vb so much
16: Private Sub cmdFileIn_Click ()
17: ‘ Read the sequential file
18: Dim intCtr As Integer ‘ Loop counter
19: Dim intVal As Integer ‘ Read value
20: Dim intFNum As Integer ‘ File number
21: Dim intMsg As Integer ‘ MsgBox()
22: intFNum = FreeFile
23: Open “Print.txt” For Input As #intFNum
24:
25: For intCtr = 1 To 6
26: Input # intFNum, intVal
27: ‘ Display the results in the Immediate window
28: intMsg = MsgBox(“Retrieved a ” & intVal & “ from Print.txt”)
29: Next intCtr
30:
31: Close # intFNum
32: intMsg = MsgBox(“The Print.txt file is now closed.”)
piece of code that i used in a previous program this code loads a file for reading and also i found it useful for my card game - why did they have to change vb so much
16: Private Sub cmdFileIn_Click ()
17: ‘ Read the sequential file
18: Dim intCtr As Integer ‘ Loop counter
19: Dim intVal As Integer ‘ Read value
20: Dim intFNum As Integer ‘ File number
21: Dim intMsg As Integer ‘ MsgBox()
22: intFNum = FreeFile
23: Open “Print.txt” For Input As #intFNum
24:
25: For intCtr = 1 To 6
26: Input # intFNum, intVal
27: ‘ Display the results in the Immediate window
28: intMsg = MsgBox(“Retrieved a ” & intVal & “ from Print.txt”)
29: Next intCtr
30:
31: Close # intFNum
32: intMsg = MsgBox(“The Print.txt file is now closed.”)