| View previous topic :: View next topic |
| Author |
Message |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Fri Aug 22, 2008 5:29 pm Post subject: EOf statement VB help |
|
|
How would I put the EOF statement on this code? I've tried everything... | Code: | On Error GoTo ErrorHandler
Dim Contentfile
Me.CommonDialog1.Filter = "Coded bat (*.bat)|*.bat"
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #2
Input #2, Contentfile
Text1.Text = Contentfile + vbCrLf
MsgBox "I'm sorry about it being glitchy, and not working well." & _
vbCrLf + "I will be trying to fix this... For now, If you want to get" & _
vbCrLf + "your code, then just open it in notepad, Copy and paste is" & _
vbCrLf + "best friend to get your code in the porgram right now, sorry" & _
vbCrLf + "for this inconvenience."
Close #2
ErrorHandler:
Select Case Err.Number
Case Else
MsgBox "You dident load"
End Select |
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Fri Aug 22, 2008 5:34 pm Post subject: |
|
|
editing.. sorry didn't think in a right way.
| Code: | while not EOF(2){
Input #2, Contentfile
Text1.Text = Text1.Text + vbCrLf + Contentfile
} |
_________________
Intel over amd yes.
Last edited by NINTENDO on Fri Aug 22, 2008 5:41 pm; edited 1 time in total |
|
| Back to top |
|
 |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Fri Aug 22, 2008 5:37 pm Post subject: |
|
|
| Naablet wrote: | EOF=end of file is only used when reading information from external files. It indicates whenever the program had read the last line or not. So you dont need to use EOF when writeing data into a file.
Atleast that's what I've learned at school. | Then your school sucks! >.> EOF means that it reads the file to the bottom or end, then what I'm trying to do, is when it reads to the bottom, it puts it in the text field...
_________________
|
|
| Back to top |
|
 |
|