Clicking a Link

  • Thread starter michael.blaustein
  • Start date
M

michael.blaustein

I would like to click on a link in a web page. Is this possible? I
have access to the InternetExplorer object via the following code:

Set IE = CreateObject("InternetExplorer.Application")


IE.Visible = True
IE.Navigate (URL)

While IE.Busy
DoEvents
Wend

I had previously written some code to click on a button, by cycling
through the objects on the page. I had used something like this to
cycle:

' Dim objHTMLElementOuter As Object
'
' For Each objHTMLElementOuter In IE.Document.all
'
' With objHTMLElementOuter
' If .tagname = "A" Then
' MsgBox ("Tag! You're It!")
' End If
' End With
'
'
' Next objHTMLElementOuter

Can I click on a link in this manner? Parsing the URL and opening a
new window with it is not an option, as far as I can see. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top