help someone read data from a web page

  • Thread starter Thread starter McRad
  • Start date Start date
M

McRad

Hello everyone,
sorry to invade your group. I'm only a casual VB programmer. I'm
usually using it to automate some simple text file I/O.

Sub testopenwebpage()
Const www = "http://www.eastbayexpress.com/issues/2003-09-17/music.html/1/index.html"
Dim EachLine
Open www For Input As #4
Do While Not EOF(4)
Line Input #4, EachLine
Debug.Print EachLine
Loop
Close #4
end sub

So, this is the basic code to read a local file but doesn't work for
accessing http files. Any suggestions? Tried to use FileCopy but that
didn't help either. It "can't find" the http file or says "bad file
name or number".

Best,
 
* (e-mail address removed) (McRad) scripsit:
sorry to invade your group. I'm only a casual VB programmer. I'm
usually using it to automate some simple text file I/O.

Use 'WebClient.DownloadFile'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top