Opening Website in Different Browsers using Macro

Dheepak

Board Regular
Joined
Aug 25, 2013
Messages
64
Hi All,

I would like to ask your help to resolve my query. Is it possible to open the websites in different browsers using macro code?

Example:

I have the heading as MrExcel.com and three buttons named as below:

First Button: Open Website Using Internet Explorer
Second Button: Open Website Using Mozila Firefox
Third Button: Open Website Using Google Chrome

When i click the button "Open Website Using Internet Explorer" the web address "http://www.mrexcel.com/forum/forum.php" needs to open in Internet Explorer.

When i click the button "Open Website Using Mozila Firefox" the web address "http://www.mrexcel.com/forum/forum.php" needs to open in Mozila Firefox.

When i click the button "Open Website Using Google Chrome" the website "http://www.mrexcel.com/forum/forum.php" needs to open in Google Chrome.

can anyone please help on this? and also if the selected browser is not installed on the system, then it should popup a message box saying "The Select browser is not installed in your system!! Kindly install it and then select or select different Browser"

Thanks much in Advance!!

Regards,
Dheepak
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Dheepak,

I know code to open the site in IE which I already got in early this year, as below:

Code:
Private Sub CommandButton1_Click()
Dim o As Object
Set o = CreateObject("InternetExplorer.Application")
o.navigate "http://www.google.com/"
o.Visible = True
Set o = Nothing
End Sub

But I didn't try for other browsers, even I've spent a few time to search and get the appropriate code. But couldn't get, but still you could use the above code to open the target websites in different tabs using separate buttons like CommandButton2, CommandButton3,... and so on.

May be some other Expert could help us to fulfill your exact scenario.
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,140
Members
449,294
Latest member
Jitesh_Sharma

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