Hey, i've just encountered a very strange problem with my open routine in one of my programs.
All its meant to do is open the given FileName, simply by putting it into Text1
Here is my routine, can anyone see where i have gone wrong ?
VB Code:
Private Function Open_File(Filename As String) On Error GoTo Hell Dim lFileLength As Long Dim iFileNum As Integer 'Get a free file number and open the file iFileNum = FreeFile Open Filename For Input As iFileNum 'Get the length of the file and 'read it into the text box lFileLength = LOF(iFileNum) Text1.Text = Input(lFileLength, iFileNum) Close iFileNum Hell: End Function




Reply With Quote