This code will read a web page and with a click of
a button will display
the web pages source code.
Start a new project and add a text box, a
command button
and the MS Internet control. Expand the text box and make
the text box multiline property true.(See the jpg file below)
Then
copy and past the code
below.
====================================================
Dim
FileName As String
Private Sub Form_Load()
'Now get the file name and
Replace '\testFile.htm' with the
'name of the HTML file you want to view the
source.
FileName = App.Path & "\testFile.htm"
WebBrowser1.Navigate2
(FileName)
End Sub
Private Sub Command1_Click()
Open FileName For
Input As #1
Text1.Text = Input$(LOF(1), 1)
Close #1
End Sub