VBA & Macro Problems

Open Excel Shape Hyperlinks in a Browser with VBA in WPS Spreadsheets

Aamir Naveed AkramAamir Naveed Akram Nov 13, 2026 868 views

Question details

The user needs to make an Excel shape hyperlink open in a browser from VBA without requiring the browser to already be running and without triggering Safe Mode when Shift-click is used.

Open Excel Shape Hyperlinks in a Browser with VBA in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
A user has an Excel shape with a hyperlink and runs VBA code to open it. The hyperlink only opens when the browser is already running, and Shift-click launches Firefox or another browser in Safe Mode.
Observed behavior
The browser opens only if it is already running; holding Shift while clicking launches the browser in Safe Mode or reset mode instead of opening the target URL normally.
Before you start

Confirm the shape's hyperlink address is valid and note the exact shape name from the Name Box before editing the VBA code.

Solution 1Recommended

Use Hyperlink.Follow instead of a Shift-click trigger

Best when you want the assigned macro to open the shape hyperlink immediately in the default browser, without depending on Shift or a pre-opened browser.

The Shift key is the likely cause of Safe Mode: holding Shift while launching Firefox or another browser can start the browser in Safe Mode or reset mode. Replacing the Shift-click action with a direct Hyperlink.Follow call avoids that trigger.

1
Open the VBA editor

In WPS Spreadsheets, press Alt+F11 to open the Microsoft Visual Basic for Applications editor.

2
Insert a module

In the Project Explorer, right-click the workbook/VBAProject, choose Insert, then click Module.

3
Paste the follow macro

Enter the following macro, replacing "Rectangle 1" with your shape name: Sub OpenShapeHyperlink() ActiveSheet.Shapes("Rectangle 1").Hyperlink.Follow NewWindow:=True End Sub

4
Assign the macro to the shape

Close the editor, right-click the shape in the worksheet, choose Assign Macro, select OpenShapeHyperlink, and click OK.

5
Click the shape without Shift

Click the shape normally. The hyperlink opens in the default browser even if the browser was not already running.

Use Hyperlink.Follow instead of a Shift-click trigger
Safe Mode avoided: Because the click action no longer relies on Shift, Firefox and other browsers start normally instead of entering Safe Mode.

Open Excel Shape Hyperlinks Reliably with a WPS Spreadsheets VBA Macro

In WPS Spreadsheets, replace the Shift-click trigger with a VBA macro that uses Hyperlink.Follow or Shell to open the shape hyperlink directly in your default browser. This avoids Safe Mode and does not require the browser to be running first.

  1. 1. Open WPS Spreadsheets: Open the workbook that contains the shape hyperlink in WPS Spreadsheets.
  2. 2. Open the VBA editor: Press Alt+F11 to open the Microsoft Visual Basic for Applications editor.
  3. 3. Insert a module and paste the macro: Right-click the workbook/VBAProject in Project Explorer, choose Insert > Module, and paste a macro that calls ActiveSheet.Shapes("YourShape").Hyperlink.Follow NewWindow:=True.
  4. 4. Assign the macro to the shape: Close the editor, right-click the shape, choose Assign Macro, select the macro, and click OK.
  5. 5. Click the shape normally: Click the shape without holding Shift. The hyperlink opens in the default browser normally.
Opens Excel shape hyperlinks without holding Shift, preventing Firefox and other browsers from entering Safe Mode.Works even when the browser is not already running by launching it with the target URL.Supports Excel VBA macro workflows and .xlsm/.xls format compatibility.Free, lightweight, and familiar ribbon interface for users moving from Microsoft Excel.Lets you run and edit existing Excel VBA projects with minimal changes.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Shift-clicking an Excel shape hyperlink open Firefox in Safe Mode?

Holding Shift while launching Firefox or another browser can trigger Safe Mode or reset mode. Use a normal click or a VBA action such as Hyperlink.Follow or Shell instead of Shift-click.

How do I open a shape hyperlink when the browser is not already running?

Use VBA to start the browser process directly, or use the Hyperlink.Follow method on the shape. For example, ActiveSheet.Shapes("Rectangle 1").Hyperlink.Follow NewWindow:=True opens the link in the default browser.

Can I use the Shell function to open a URL from WPS Spreadsheets VBA?

Yes. Add a module in the VBA editor and use Shell to launch the default browser with the URL, such as Shell "explorer.exe " & Chr(34) & URL & Chr(34), vbNormalFocus.

How do I assign a macro to a shape in WPS Spreadsheets?

Right-click the shape, choose Assign Macro, select the macro from the list, and click OK. You can also set the OnAction property from VBA.

Is Hyperlink.Follow better than Shell for opening a shape hyperlink?

Hyperlink.Follow is usually simpler because it uses the hyperlink already attached to the shape and opens it in the default browser. Shell gives more control if you need a specific browser executable.