Macro of web page link

Sandeep Singh

New Member
Joined
Mar 13, 2013
Messages
40
Hi All,

I have broke the link into two from between. The broken link is in 2 different cells. And there are 2 cells whose data should also be included in this link, then only the link is complete. I have used the below code to run a link

Sub openlinkweb()
Dim wLink As String
wLink = Range("I10") & Range("D8").Value & Range("D11").Value & Range("I13").Value
ActiveWorkbook.FollowHyperlink Address:=wLink, NewWindow:=True
End Sub

<tbody>
</tbody>
Its error free. I have assigned this macro to a button. Once i click the button the link is getting opened and its fine and second time when i click its getting open again, now I have 2 web pages open.

My question is when i click button second time the web page should not be open, as its already opened open, it should only get refreshed.

<tbody>
</tbody>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi

Have you tried doing it using web query instead?

Dave
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,720
Members
449,050
Latest member
MiguekHeka

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