LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default HTML Document.Links Issues

Thanks to dicks-blog.com I've just recently managed to find out how to access
web pages and bring the data back to Excel (2000) VBA even when it's not in a
table. The possibilities are very exciting. But I have run into two vexing
problems.

1) The same code that retrieves the collection of links on a page --
essentially, Document.Links -- works with two homepages and fails on a third.
The links on the third look the same to me -- static links with plain text
anchors.

2) One of my tasks is to list out the links in a sort of tree structure. It
would make sense to do this recursively, up to a user-specified number of
levels deep. But I started with a non-recursive model, figuring it would be
easier to debug. Moving to the second level, I load the page that the first
link points to, and grab ITS link collection, storing that in a different
variable. I process the page and come back to the first level. At that point,
trying to access the links collection so I can process the next link gives me
an Error 70, Permission Denied. This happens even if I reload the first-level
page and then try to re-retrieve the collection.

Since I've already stored the links collection in a variable, it shouldn't
matter that I've left the page where I got it from, should it? And why can't
I re-retrieve it even if I reload the page? Reloading is an abuse of
bandwidth and would make the macro take much longer to run, so I really want
to preserve the loaded links collection and just keep referring to it.

TIA,
Gregg Roberts
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
links issues freekrill Excel Discussion (Misc queries) 1 November 29th 05 05:31 PM
Opening Excel Document in ASP.NET and having issues...please help Josh Behl[_2_] Excel Programming 0 November 11th 05 03:04 AM
Update links - hyperlink issues Shan Excel Discussion (Misc queries) 0 March 3rd 05 01:57 PM
Links in html-file Mar Excel Discussion (Misc queries) 0 February 1st 05 12:01 PM
Get a value from a table in an HTML document Terry V Excel Programming 6 October 5th 04 04:37 AM


All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"