Open a File For Input





3
Date Submitted Mon. Oct. 10th, 2005 11:50 AM
Revision 1 of 1
Helper ryan
Tags "Visual BASIC" | File | Open
Comments 0 comments
Open a File For Input
Public Function fileOpenFile(strFileName As String) As String

    Dim intFreeFile As Integer, strInput As String
    Dim strTemp As String
   
    intFreeFile% = FreeFile
   
    Open strFileName$ For Input As #intFreeFile%
       
        Do: DoEvents
            Line Input #intFreeFile%, strInput$
            strTemp$ = strTemp$ & strInput$ & vbCrLf
        Loop Until EOF(intFreeFile%)
       
    Close #intFreeFile%
   
    fileOpenFile = strTemp$

End Function

Ryan Latham

www.unmatchedstyle.com
Ryan Latham
Unmatched Style

Comments

There are currently no comments for this snippet.

Voting

Votes Down


Scripter ASmith