Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default VBA to check if a URL is working

Nick,

Its throwing out an error for me.

-Dileep

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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



Reply
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
Check box not working out for me.. why? TG Excel Discussion (Misc queries) 5 June 24th 09 11:36 PM
Check Box not working HR Sam Excel Discussion (Misc queries) 1 October 20th 08 10:27 PM
Check Box Not working? Anand vijay New Users to Excel 3 January 6th 07 03:34 AM
Check boxes not working Pflugs Excel Programming 4 October 30th 05 11:30 PM
Check variance code not working goss[_35_] Excel Programming 2 October 5th 04 04:14 AM


All times are GMT +1. The time now is 10:39 PM.

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

About Us

"It's about Microsoft Excel"