Is there a function in VB to hit an URL and get back the HTML from that web page?
I do not want to launch IE.
Thanx
dvst8
Printable View
Is there a function in VB to hit an URL and get back the HTML from that web page?
I do not want to launch IE.
Thanx
dvst8
I've found the following which will do what I want:
but when I try to run this I get the error "Object Required" the first time I make reference to Inet1Code:Private Sub Run_Click()
Dim Inet1
Dim b() As Byte
Dim intCount As Integer
Dim strData As String
Inet1.Cancel ' Stops any current operations
b() = Inet1.OpenURL("http://www.vbsquare.com/index.html", icByteArray)
For intCount = 0 To UBound(b) - 1
strData = strData & Chr(b(intCount))
Next intCount
MsgBox strData
End Sub
do I have to 'construct' the Inet object??
(and yes I did check Microsoft Internet Controls in Components)
ideas?
thanks!
You need to add the MS Internet Transfer Control component in vb
You then need to put that compnent on the form