I need this routine to grab the source code from a webpage and save it to a text file.
I then need to import the text file (command1 click code) and be able to import a line at a time for parsing purposes.
If I run this (importpage first then command1_click) an output file gets created.
If I open it in my browser all looks great, but if I open it in Notepad its all over the place and my
"Line Input" statement doesn't input a line at a time because there doesn't seem to be any CR/LF's.
What's wrong here please?
This is the code:
Dim sHTML As String
Dim sURL As String
sURL = "http://aolsvc.weather.aol.com/main.adp?location=USNY0181
sHTML = Inet1.OpenURL(sURL)
Open "C:\page.html" For Output As #1
Print #1, sHTML
Private Sub Command1_Click()
Open "C:\page.htm" For Input As #1
While Not EOF(1)
Line Input #1, a$