Conditional hyperlink onto a shape

mrewdorrison

New Member
Joined
Jun 9, 2015
Messages
1
Hello all,

I have a project I've been working on and up till this point I've been using shapes to link to other sheets within the workbook. However, I would like to add a new "current stage" button that will send me to a specific sheet depending on the value in cell A5 in Sheet1.

I'm pretty new to excel (been teaching myself for about a year), so I don't even know if you can apply a conditional hyperlink onto a shape. If it is possible I was hoping you all could help me out.

Thanks in advance!
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Worf

Well-known Member
Joined
Oct 30, 2011
Messages
3,967
Hello and welcome to the Board

- create the hyperlink manually (this can be automated if you want)
- paste the code where indicated
- type the sheet name at A5 and the link will be updated.

Code:
' at Sheet1 module
Private Sub Worksheet_Change(ByVal Target As Range)
Dim s As Shape
Set s = Me.Shapes("Image1")
If Target = [a5] And Len(Target) > 0 Then s.Hyperlink.SubAddress = Range("a5") & "!a1"
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,099,013
Messages
5,466,023
Members
406,461
Latest member
Garrus

This Week's Hot Topics

Top