Web Query in excel?

L

Legacy 237453

Guest
Hi

Im after a VBA Macro that on the click of a button will test to see if 3 differant webpages are up and available. If the 1st webpage is Running as it should i would like the macro to change the color of a cell A1 to green.
2nd webpage is running change cell A2 to green
3rd webpage is running change cell A3 to green.

If there is a problem with the webpages i would like a pop up box to appear saying "problem with webpage - please investigate" then click OK

This alot to ask and i dont even know if its possible?

The other problem is that if theres a issue with the webpage it still displays as up but with a mantinace screen, is there a way for the macro to distinguish what is actually running correctley?

Thanks
Craig!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
It might be possible yes. It would depend if there were some keywords in the maintenance page that we could look for or a HTML element that only appears in this screen that doesn't appear in the live sessions.
 
Upvote 0
hmm im sure i can get the elemants i need because we own the websites. The other issue is that they are hoasted on servers in France and russia and only people on our Network can access them. would that make a differance or would the codeing be the same since the macro will be on our network anyway?
 
Upvote 0
To be honest Craig I don't know.

If you can access the sites via a browser and don't have to do anything else except enter a URL then I would say yes.
But if you have to do additional things like login to a proxy or something then I'm not sure, although you can enter details into the elements if you need to.

Reading Web Pages using Excel VBA - Stack Overflow
This is the post I would be using to help you. If you can do it with reference to this then great, if not either post in the forum or send me a PM if there are details you don't want listed in the forum :D
 
Upvote 0
What I would do would be to change the code in that article to a function that requires a URL and the function would return True or False based on whether the "maintenance" elementID was found.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,195
Members
449,072
Latest member
DW Draft

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