Accessing websites via Macro

JonasKl

New member
Joined
Nov 15, 2016
Messages
2
Reaction score
0
Points
0
Hey guys,

I'm working on my master thesis right now and I'm facing quite a complicated problem (at least for me). Maybe someone can help to solve it or least tell me if it is actually solvable. I haven't found anything comparable in the topics database here.

I have an Excel file with more than a thousand links to websites in one column. They always refer to kickstarter.com, could be for example this link:

kickstarter.com/projects/539752036/the-vault-music-studios?ref=nav_search

So, I'll explain to you what I manually would need to do now. I want to click each link in the Excel file, visit the website, check if there is a link somewhere (slight problem: there might be more than one link), click this/these link(s), and check if the/these link(s) is/are still active. Then I want to make a note into the Excel file, more precisely into the column next to the respective link, which says either "No link available on kickstarter.com" or "Link(s) available but the respective website(s) is/are inactive" or "Link(s) available and website(s) still active". It doesn't matter if one or more more than one link is still active, that would always be category 3. Well, actually I wouldn't write out the three options either, just assign 1,2, and 3 to them. But just so that you get the picture.

My question is now: Is it possible to automate that in Excel oder in any other (affordable) software? Stata for example would actually also work, I have a license for that. And if it is not possible, can I at least automate to click the respective link in the Excel file and then check on this website if there is an URL at all?

Thanks a lot in advance!

Cheers,
Jonas
 
Yes, it's possible, but why ? Every webpage has a link to the 'homepage' of the website. That's always correct in the case of Kickstarter. You don't need to check 1000 times that the link to the homepage is functioning.
 
In our list, the links to a bunch of projects are not functioning since the projects are older and the respective companies are already out of business. So, as a very first step, we want to know what links are still working.
 
Code:
Sub M_snb()
   On Error Resume Next
   
   sn = Array("http://www.snb-vba.eu", "http://www.snb_vba.eu")
   For j = 0 To 1
    ThisWorkbook.FollowHyperlink sn(j)
    If Err.Number <> 0 Then c00 = c00 & vbLf & sn(j)
    Err.Clear
   Next
   
   If c00 <> "" Then MsgBox c00, , "Alas"
End Sub
 
Back
Top