bklocinski
New member
- Local time
- Today, 12:53
- Joined
- Sep 24, 2012
- Messages
- 1
I am a beginner at VBA and I am looking for some help on how to click a link on a web page. I have looked at other posts but I still can't seem to get the code to work.
Here is my code as it is now and the source code from the website for the "click here" link.
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate ("Website Address-Cannot Post Link")
IE.StatusBar = False
IE.Toolbar = True
IE.Visible = True
IE.Resizable = True
IE.AddressBar = False
'Pause while page loads
While IE.busy
DoEvents
Wend
'Find Click Here Link
IE.document.getElementById("").Click
'Source Code From Webpage
'src="Website Address-Cannot Post Link" width="290" height="17"><br><strong>No purchase is necessary to
'enter.</strong> If you'd prefer to enter the sweepstakes without starting a trial
'subscription to House Beautiful or if you are already a subscriber, <a
'onclick="altSubForm();" style="text-decoration:underline; cursorointer;">click
'here</a>.</div></td>
Here is my code as it is now and the source code from the website for the "click here" link.
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate ("Website Address-Cannot Post Link")
IE.StatusBar = False
IE.Toolbar = True
IE.Visible = True
IE.Resizable = True
IE.AddressBar = False
'Pause while page loads
While IE.busy
DoEvents
Wend
'Find Click Here Link
IE.document.getElementById("").Click
'Source Code From Webpage
'src="Website Address-Cannot Post Link" width="290" height="17"><br><strong>No purchase is necessary to
'enter.</strong> If you'd prefer to enter the sweepstakes without starting a trial
'subscription to House Beautiful or if you are already a subscriber, <a
'onclick="altSubForm();" style="text-decoration:underline; cursorointer;">click
'here</a>.</div></td>