Trying to get a macro to query a webpage for text.

Damar

New Member
Joined
Apr 27, 2005
Messages
3
Hi,

I'm trying to put something well beyond my knowledge into a macro, so would really appreciate help here.

What I want to do is create a simple webpage with a list of places and a status and then get the macro to look for a specific places and get it's status.

For example the webpage might have the following text:

Computer1 Active
Computer2 Not Active
Computer3 Active

What I want the macro to do is load the webpage, which I can do using:

Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
'Set my URL
Dim myURL As String
myURL = "my site url here"
'Make IE navigate to the URL
IE.navigate myURL

Then I want it to take the name from cell A1 for example "Computer3", scan the webpage for it and paste the status "Active" into cell B1.

Any help would be really appreciated.

Many thanks,

Mark
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,832
Messages
5,855,890
Members
431,772
Latest member
dannyboi1

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
Top