Data Validation refers to Named Range - like to add popup with hyperlink based on selection

mssbass

Active Member
Joined
Nov 14, 2002
Messages
253
Platform
  1. Windows
I have a column (column AJ) that contains Data Validation referring to a named range. If the selected value in column AJ begins with "Y", I'd like a popup with a hyperlink the user can click on to view a different worksheet in the same workbook (currently hidden).
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
When my Target Value equals the exact wording in the dropdown, the messagebox will popup; however, they can select several that start with Y - it's also a named range called "HTSPopup". How do I have the message box pop-up if the user selects anything that starts with Y or matches the named range?

Here is my code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Range1 As Range
Dim lrdp As Long
lrds = Me.Cells(Me.Rows.Count, "A").End(xlUp).Row
Set Range1 = Me.Range("AJ1:AJ" & lrds)

If Not Intersect(Range1, Target) Is Nothing Then
'Rule for Range1
If Target.Value = "Y- Escalated by Patient" Then
If msgbox("Enter now into HTS Template?", vbInformation + vbYesNo, "Go now") = vbYes Then
If Sheets("HTS Template").Visible = False Then Sheets("HTS Template").Visible = True
Sheets("HTS Template").Select
End If

End If
End If



End Sub
 
Upvote 0

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

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