ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   checking if an url exists (https://www.excelbanter.com/excel-programming/341601-checking-if-url-exists.html)

Aldo[_2_]

checking if an url exists
 
Hi all,

is it possible in VBA to check if an url exists

Thanks



dominicb[_143_]

checking if an url exists
 

Good morning Aldo

I don't know of a more direct way, but this routine will trap a call to
an invalid url. If the address exists, it will be opened

On Error GoTo Last
ThisWorkbook.FollowHyperlink Address:="http://www.microsof.com",
NewWindow:=True
Exit Sub
Last:
MsgBox "Invalid address"

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=472254


Aldo[_3_]

checking if an url exists
 
Thanks, it works !

"dominicb" a écrit
dans le message de news:
...

Good morning Aldo

I don't know of a more direct way, but this routine will trap a call to
an invalid url. If the address exists, it will be opened

On Error GoTo Last
ThisWorkbook.FollowHyperlink Address:="http://www.microsof.com",
NewWindow:=True
Exit Sub
Last:
MsgBox "Invalid address"

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile:
http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=472254





All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com