View Single Post
  #27   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Watchdog timer issues

Garry,
This is my day for admitting stupidity. I downloaded the revised
ParseWebPages.zip file and opened ParseWebPages.xls. I can't see what
it does. When I try to run AutoParse, I get "Compile Error
Can't find project or library". Format is highlighted in
"oTimer.StopTimer: Debug.Print "AutoParse took " &
Format(oTimer.Elapsed, "#.000000") & " seconds.""


The project requires 'References' to:

Microsoft Internet Controls
Microsoft HTML Object Library


All the controls on 'Sheet1' work with WebBrowser1 and txtPgSrc.

You must 1st 'View Source' for the page rendered in the browser.
If the page is a 'parent' it contains links to items (child pages);
Click 'Get Item Links' to parse these links into txtPgSrc;

If you click a link in the browser:
Click 'View Source' to load the HTML into txtPgSrc;
Click 'Get Item Info' to load the search results into txtPgSrc;


The 'AutoParse' proc in m_OpenClose uses 'URLDownloadToFile()'. This
returns the entire web page source which, you will see if you compare,
is entirely different than the source returned for the rendered page in
the browser.


This example searches nsncenter.com for specific product info. It demos
how to parse the same info from a browser as well as directly from a
downloaded file. Some links have more than 1 product item listed, which
you'll see using the controls on 'Sheet1'. The same info is written to
an output file using the 'AutoParse' proc. Currently, this proc is
hard-coded to process 10 parent pages, each of which contain links to
11 child pages.

As of this reply both approaches are working as expected. Try closing
Excel and start over. Be careful to not just 'End' VBA when an error
occurs because this leaves objects loaded to memory; -make sure these
are set to 'Nothing'.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion