Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I know how to do the basic: open "c:\file.txt" for Input As #1 is it possible to open a web site for text input, and read the html code as text into VBA? What would the format for the filename be? Thanks so much in advance! Joey |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Function GetSource(sURL) As String
Dim xmlhttp As Object Set xmlhttp = CreateObject("Microsoft.XMLHTTP") onerror goto haveError xmlhttp.Open "GET", sURL, False xmlhttp.send GetSource = xmlhttp.responseText Exit Function haveError: GetSource = "Error: " & Err.Description End Function Sub test() MsgBox GetSource("http://www.google.com") End Sub Tim "Joey Lichtenstein" wrote in message ... I know how to do the basic: open "c:\file.txt" for Input As #1 is it possible to open a web site for text input, and read the html code as text into VBA? What would the format for the filename be? Thanks so much in advance! Joey |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tim!
This Works PERFECT!!!! Tim Williams <timjwilliams at gmail dot com wrote: : Function GetSource(sURL) As String : Dim xmlhttp As Object : Set xmlhttp = CreateObject("Microsoft.XMLHTTP") : onerror goto haveError : xmlhttp.Open "GET", sURL, False : xmlhttp.send : GetSource = xmlhttp.responseText : Exit Function : haveError: : GetSource = "Error: " & Err.Description : End Function : Sub test() : MsgBox GetSource("http://www.google.com") : End Sub : Tim : "Joey Lichtenstein" wrote in message : ... : : I know how to do the basic: : : open "c:\file.txt" for Input As #1 : : is it possible to open a web site for text input, and read the html code : as text into VBA? What would the format for the filename be? : : Thanks so much in advance! : : Joey : |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ON OPEN VBA Code input incorrectly now excel sheet wont open | New Users to Excel | |||
Macro to automatically open a website or send an e-mail in excel | Excel Discussion (Misc queries) | |||
want to download csv file from website and need to open in Excel. | Excel Discussion (Misc queries) | |||
Is it possible to link spreadsheet to website for input | Excel Discussion (Misc queries) | |||
Can't open XL file on website in IE6 | Excel Discussion (Misc queries) |