![]() |
VBA to check if a URL is working
To the masters of microsoft excel:
Is it possible using a VBA to check a couple of links (Range("A1:A100")) are working properly? I want to open the URL and check if that particular article has been expired or not? Is there a way to do it? Thanks & Regards -Dileep Chandran |
VBA to check if a URL is working
Dileep,
Something like this, although there are probably other errors that that will cause the method to fail that you should include. Just try and get it and if it fails, then it's not the Private Sub CommandButton1_Click() On Error GoTo Handler ThisWorkbook.FollowHyperlink "http://yoursite.com/somefilethatdoesnotexist.txt" Exit Sub Handler: Select Case Err.Number Case -2146697210 MsgBox "File not available" Case Else End Select End Sub NickHK "Dileep Chandran" wrote in message ups.com... To the masters of microsoft excel: Is it possible using a VBA to check a couple of links (Range("A1:A100")) are working properly? I want to open the URL and check if that particular article has been expired or not? Is there a way to do it? Thanks & Regards -Dileep Chandran |
VBA to check if a URL is working
Nick,
Its throwing out an error for me. -Dileep |
VBA to check if a URL is working
Dileep,
It would help if you said which error. NickHK "Dileep Chandran" wrote in message ps.com... Nick, Its throwing out an error for me. -Dileep |
All times are GMT +1. The time now is 05:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com