Web site Accessible UDF

JGordon11

Well-known Member
Joined
Jan 18, 2021
Messages
811
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Looking for help with a UDF that can return True if a website at URL can be accessed. If the website does not exist, or the the computer isn't connected to the internet or some other reason the web site is not accessible the UDF would return False, otherwise True. (Or if its easier to do the opposite and if there is success return True otherwise False).

Something like
VBA Code:
Function WebSiteAccessible(URL As String) As Boolean
    If Not (...need code for unable to connect to website at URL...) Then
        WebSiteAccessible  = True
    End If
End Function

or
VBA Code:
Function WebSiteAccessible (URL As String) As Boolean
    If  (...need code for able to connect to website at URL...) Then
        WebSiteAccessible  = True
    End If
End Function
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Thanks. That link is definitely on topic. But I couldn't get of those suggestions to work.
 
Upvote 0

Forum statistics

Threads
1,215,001
Messages
6,122,648
Members
449,092
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top