[Resoved] Text Reader Help
hi!
i have a Text Editing software where i can load any .txt file.
this works perfectly just i want to get rid of the error message " file cannot be found" and replace it with a msg box saying some thing like "Windows cannot fild the file "abc" , please make sure you have typed the name correctly."
here is the code i have created
VB Code:
Private Sub cmdLoad_Click()
Dim strName As String
Dim strFile As String
Dim strTemp As String
strName = InputBox("Filename:") ' file name to load
Open "C:\" & strName & ".txt" For Input As #1 ' loaded file
strFile = ""
Do Until EOF(1)
Line Input #1, strTemp
strFile = strFile & strTemp & vbCrLf
Loop
txtout.Text = strFile 'print file to textbox
Close #1
End Sub
Thx in advance!! :wave:
Re: [Resoved] Text Reader Help
Just use a CommonDialog its easier.