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
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Watch MrExcel Video

Forum statistics

Threads
1,118,820
Messages
5,574,508
Members
412,599
Latest member
Schu94
Top