OK here you go.
Private oDoc As Object
I used a common dialog box called "dlgOpen" to open the text file, a webbrowser control named "wbDocument", and create a blank text file to speed up the webbrowser controls loading.
Private Sub Form_Load()
Dim fso As New FileSystemObject, FilePath, txtfile, Stream
On Error GoTo ErrHnd
If Not fso.FileExists(App.Path & "\Blank.txt"

Then
fso.CreateTextFile (App.Path & "\Blank.txt"

End If
With dlgOpen 'Dialog Box For Finding File To Edit
.Filter = "text files " & "(*.txt) | txt"
.FilterIndex = 1
.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly
End With
wbDocument.Navigate App.Path & "\Blank.txt
Exit Sub
ErrHnd:
MsgBox Err.Number & " " & Err.Description & " Error Generated By " & Err.Source, vbCritical, "System Error Trap !"
End Sub
A command button named "cmdOpen" to open the common dialog box
Private Sub cmdOpen_Click()
Dim sFile As String
On Error GoTo ErrHnd
With dlgOpen
.FileName = ""
.ShowOpen
sFile = .FileName
End With
If Len(sFile) Then
Set oDoc = Nothing
wbDocument.Navigate sFile
End If
Exit Sub
ErrHnd:
MsgBox Err.Number & " " & Err.Description & " Error Generated By " & Err.Source, vbCritical, "System Error Trap !"
End Sub
You will need to make some modifications to the code to open the text file you create but this should get you started. Good luck.
Anything is possible, the problem is I only have one lifetime.
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)