Retrieving Source Code from a Web Page (URL):
Return to List
' Place the following controls on a form: ' RichTextBox1 (Rich Textbox); ' Inet1 (Internet Control) ' Text1 (Textbox); ' Command1 (Command button)
Private Sub Command1()
Dim Source1 as String
If Len(Text1) > 0 Then' We'll assume the User entered a URL for Download Source1 = Inet1.OpenURL(Me.Text1.Text)
If Len(Source1) > 0 Then
RichTextBox1.Text = Source1
Me.Inet1.Cancel
Else
Source = MsgBox("Source code is not available.", vbInformation, "Source Code")
End If
End If
End Sub