VBScript To Open Webpage then Click URL

BennyBB

New Member
Joined
Sep 6, 2013
Messages
33
In VBScript I want to do the following:

1. Open windows internet explorer
2. Goto a URL
3. Wait for URL to load
4. After URL is loaded, find a certain URL link id in the html of the page from step 3.
5. Click the link.

I can do step 1, 2, 3. But can't seem to get step 4 &5. Any help with an example possible? Thanks, BennyBB
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Can you post what you have so far?
 
Upvote 0
Can you post what you have so far?

Here it is:

Rich (BB code):
' Visual Basic Script (VBS)
'
'
'
Option Explicit
On Error Resume Next
' Declaration of variables
Dim ie
' Declaration of subroutines
' Sub WaitForLoad waits for webpage to finish loading
' before proceeding with next line of code
Sub WaitForLoad
Do while ie.Busy
wscript.sleep 200
Loop
End Sub
' Open windows Internet explorer and surf to website
set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "www.aol.com"
ie.Toolbar=0
ie.StatusBar=0
ie.Height=560
ie.Width=1000
ie.Top=0
ie.Left=0
ie.Resizable=0
Call WaitForLoad
ie.Visible = true
'  Add code below to search html link that belongs to www.aol.com for for innerHTML "Get Free Email" then click link "Get Free Email"

Thanks for your help
 
Upvote 0

Forum statistics

Threads
1,225,653
Messages
6,186,203
Members
453,340
Latest member
yearego021

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