i am using an embedded
vb application to open and display the contents of a file in a test box....
Dim fso As FileCtl.FileSystem
Dim Fil As FileCtl.File
Dim StrFullFileName As String
Dim sTheData As String
StrFullFileName = "\Program Files\text.txt"
Set fso = CreateObject("FileCtl.FileSystem")
Set Fil = CreateObject("FileCtl.File")
If Len(fso.Dir(StrFullFileName)) > 0 Then
Fil.Open StrFullFileName, fsModeInput, fsAccessRead
sTheData = Fil.LineInputString
Text1.Text = sTheData
Else
MsgBox StrFullFileName & " does not exist."
End If
Set fso = Nothing
Set Fil = Nothing
but each time i run the program i am getting an error saying that the file do not exist ..this is my file location c:\Program Files\text.txt .Even if i give the full path i am getting the same error.....
please give a solution for this problem
thanks in advance