Retrieve link from web page

camarao69

New Member
Joined
Sep 28, 2017
Messages
1
Hello

I´m very new to VBA and I need help for some work i'm doing.

The macro below opens the webpage i want, then inserts my ref, then submits. After submiting it, it opens a new webpage. What i need is to retrieve some links in it. The links is "javascript:loupe(R0000000001)" the last numbers can increase if there is more links, i just need up to 5 "javascript:loupe(R0000000005)" its enough I have A1:A1000 cells with refrences to search, I just need the URLS extracted in a worksheet
Macro I have :
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">Sub Redirect()
Dim IE As Object
Dim doc As Object

Set IE = CreateObject("InternetExplorer.Application")

With IE
.Visible = True
.Navigate"http:.............../CCDISP.HTMWSYD_EVENT=CCCOMM13&CTCSES=3309443#ancre"

Do Until .ReadyState = 4: DoEvents: Loop

With .Document.forms("CCREFE11")
.elements("INREFE").Value = Range("A2")
.submit
End With

Do Until .ReadyState = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop

End With
End Sub</code>Can someone help and make the proper adjustments ?
Thank you
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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