Open Excel Shape Hyperlinks in a Browser with VBA in WPS Spreadsheets
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.

- 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.
Confirm the shape's hyperlink address is valid and note the exact shape name from the Name Box before editing the VBA code.
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.
In WPS Spreadsheets, press Alt+F11 to open the Microsoft Visual Basic for Applications editor.
In the Project Explorer, right-click the workbook/VBAProject, choose Insert, then click Module.
Enter the following macro, replacing "Rectangle 1" with your shape name: Sub OpenShapeHyperlink() ActiveSheet.Shapes("Rectangle 1").Hyperlink.Follow NewWindow:=True End Sub
Close the editor, right-click the shape in the worksheet, choose Assign Macro, select OpenShapeHyperlink, and click OK.
Click the shape normally. The hyperlink opens in the default browser even if the browser was not already running.

Use the Shell function to launch the browser with the URL
Use this when you prefer to launch a specific browser executable with the URL from VBA and want the browser to open even if it is not already running.
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. Open WPS Spreadsheets: Open the workbook that contains the shape hyperlink in WPS Spreadsheets.
- 2. Open the VBA editor: Press Alt+F11 to open the Microsoft Visual Basic for Applications editor.
- 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. Assign the macro to the shape: Close the editor, right-click the shape, choose Assign Macro, select the macro, and click OK.
- 5. Click the shape normally: Click the shape without holding Shift. The hyperlink opens in the default browser normally.

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.




