Question : Click an Hyperlink in Internet Explorer Using an Excel Macro

Is there a general rule when writing a macro to clicking a hyperlink to move to the next page? For instance I am writing an macro that bring me to a page where I need to simply click a link to move on. Here is the link in the source code:









Choose a shipping address
Is the address you'd like to use displayed below? If so, click the corresponding "Ship to this address" button. Or you can enter a new shipping address.

   






I want to click the a href="#new-address" link. Any help much apprecaited.

      

Answer : Click an Hyperlink in Internet Explorer Using an Excel Macro

Is that what you want?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Sub test()

    Dim IE As Object
    Dim IEaddress As String
    
    'OPEN INTERENT
    Set IE = CreateObject("InternetExplorer.Application")
    IEaddress = "file://youfile.html"
    IE.Visible = True
    IE.Navigate IEaddress
      
    While IE.Busy
      DoEvents
    Wend
    
    
    IE.Navigate "#new-address"

End Sub
Random Solutions  
 
programming4us programming4us