Data Validation & Combo Boxes

zendog1960

Active Member
Joined
Sep 27, 2003
Messages
459
Office Version
  1. 2019
Platform
  1. Windows
Hello Folks,

I am trying to create either a combo-box list or a data validation list for a end user selction of resources. I can do that except I want the list to be somewhat interactive. I have created a sample of what I am talking about.

in AA20 thru AA21 is a list of items I want in the pulldown portion of the form. The hyperlink portion of the cells do not come in to the list however. I want them to use a pulldown to selct from a list, the if they select the name it will use the hyperlink to email tat person. Am I making sense here? Here is what I have just can not get the hyperlinks to come into the validation or the list box.
Book2
UVWXYZAA
17Test Area
18Resources
19
20ManagerManager
21Assistant
22
23
24
Sheet1
 
ok I found out why....

I made the change but

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
Dim r As Long
If Application.Intersect(Target, Range("VCells")) Is Nothing Then Exit Sub

I didn't change this line with the right range name. I changed it and it works great!

Set Rng = Range("Resources")
r = WorksheetFunction.Match(Target.Value, Rng, False)
Rng.Cells(r, 1).Hyperlinks(1).Follow
End Sub
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I have one final question. In the list of values I am using for a validation, I am including a blank cell. This is so we can have a clean slate each week and to no confuse the end user. When I slect the blank cell I get a run time error as follows:

Runtime error 1004:

Unable to get the Match property of the WorksheetFunction class

How do I handle the blank in the validation list so it does not bring up this error?
 
Upvote 0
Help With this final Question

What can be done about a blank item on the validation list? I keep getting those 1004 run time erros and it stops the macro from running. I want the blank but don't want the error. How do we accomplish this?
 
Upvote 0
Try:

Code:
If Application.Intersect(Target, Range("VCells")) Is Nothing Then Exit Sub
If IsEmpty(Target) Then Exit Sub
 
Upvote 0

Forum statistics

Threads
1,224,868
Messages
6,181,483
Members
453,046
Latest member
Excelvbaexpert

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