Launching Edge from Excel link when Firefox is default

ge8marble

New Member
Joined
Sep 2, 2023
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Some web sites do not work properly with Mozilla Firefox and require MS Edge. I have a spreadsheet with numerous web sites saved in links that launch my default browser (Firefox). But for those few that require Edge, I'd like the link to launch Edge, instead. Is there a way to do that?

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
This is the work of "CA Engineer" on StackOverflow.

This works. Just tested.

Seems like this will:
Check comment box.
If comment box has URL beginning with http, it will open in the selected browser.
If comment box is blank or does not start with http, then it will open with the default browser.

You will have to add a comment to every link on the sheet or you'll get error 91. It will still work, but the error is annoying. The links you want to use the default browser, just click insert comment.

For links you want to open with Firefox:
Edit Hyperlink > Place in This Document > Text to display: (What you want displayed) > Type the cell reference: The cell you have the hyperlink in.
Edit Comment: (Clear the default starting name, then paste the url beginning with "http".
1693697027567.png

1693697050676.png


For links to open with default:
1693696996832.png


Place on sheet object.

VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

    If Left(Target.Range.Comment.Text, 4) = "http" Then
        Call Shell("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" & Target.Range.Comment.Text)
    End If

End Sub

You could also always just change default opening app to edge for all links.
 
Upvote 0

Forum statistics

Threads
1,216,109
Messages
6,128,883
Members
449,477
Latest member
panjongshing

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