I am attempting to put a drop down list in excel where the user can click on a name in the list and be taken by hyperlink to either the bookmark or the web site in Excel. I have no problem asigning a hyperlink to a cell address, and I have no problem creating the drop down list with VBA with the proper names listed but cannot seem to figure out the code for the selected names. The drop down is on the Excel sheet and is not associate with a userform.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Drop Down in Excel (Excel 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Drop Down in Excel (Excel 2000)
- This topic has 12 replies, 4 voices, and was last updated 22 years, 5 months ago.
AuthorTopicWSHoratio64
AskWoody LoungerOctober 8, 2002 at 11:21 pm #377713Viewing 2 reply threadsAuthorReplies-
WSAndrewO
AskWoody Lounger -
WSHoratio64
AskWoody LoungerOctober 9, 2002 at 11:25 pm #623077I can get the drop down to work but when I click on the choice in the drop down it will not hyperlink me with the object. I think VBA is the only way to have the hyperlink to execute on the click from the drop down box. But if you have another way, I would love to hear it. Given the size of the data, I want to go to the data. Not the other way around which seems the primary purpose of the standard dropdown in Excel. Here is the code I have been working with.
Private Sub UserForm_Initialize()
ComboBox1.AddItem “Ankle”
ComboBox1.AddItem “Arm”
ComboBox1.AddItem “Cervical Back”
End SubPrivate Sub ComboBox1_Change()
ComboBox1.DropDown
Select Case ComboBox1.Value
Case 0 ‘Left Top
CommandButton1.Caption = “Ankle”Worksheets(“July 2001 Surgical Estimates”).Range(“v3”).Hyperlinks(1).Follow ‘tried this
Worksheets(1).Range(“v3”).Hyperlinks.Item(1).Follow NewWindow:=False, AddHistory:=True ‘ tried this
Range(“b793”).Select ‘tried thisCase 1
CommandButton1.Caption = “Arm”
Range(“b793”).SelectCase 2
CommandButton1.Caption = “Cervical Back”
Range(“b793”).SelectEnd Select
End Sub -
WSAndrewO
AskWoody LoungerOctober 10, 2002 at 5:48 pm #623223I struggled to see how your hyperlinks were being set. Could I just clarify my understanding
Your combo box contains a list of names (e.g. “Ankle”) which are text strings (not hyperlinks)
Based on the choice you wish to link to some other place
You can identify the choice – but are now wanting to jump to elsewhere.Your problem seems to be to link using a hyperlink. If one existed in a cell such as A1 then
range(“a1”).hyperlinks(1).follow
statement would have worked.To create a hyperlink programatically you’d need a
ActiveSheet.Hyperlinks.Add
statement to have created it in the first place.I didn’t see one in your code. It would be easy enough to add via VBA (if you knew the target address), or, depending on your application, in advance.
If it were added in advance, it has to live in a cell, which your combo box routine would then have to ‘follow’
I’m getting into assumption space here but, I assume you’re thinking of the the names in the combo box as links – at best they will be the link’s “TextToDisplay” value and will need to be used in a lookup of the hyperlinks object for a match, then followed by a follow.
-
WSHoratio64
AskWoody LoungerOctober 14, 2002 at 2:56 pm #624059I continue to struggle with this. I am kind of surprised since this seems to be such a standard feature in Java but few folks use Excel as a reference sheet to jump around in. The hyperlinks in this case are actually bookmarks. Since bookmarks are treated much as URL’s are in creating links for Excel documents, I figured I could use the same or similar language to use the drop down box.
“Ankle” is bookmarked for cell B793.
“Arm” is bookmarked for cell B259
“Cervical_Back” is bookmarked for B435
etc.There are bunch others but I am can replicate the formula once I have statement which works. Maybe I should put the ActiveSheet.Hyperlinks.Add in the UserForm_Initialize() module to add the names and the hyperlinks to the combo box.
I tried the following:
Select Case ComboBox1.Value
Case 0 ‘ First case
CommandButton1.Caption = “Ankle”
Range(“b793”).Hyperlinks(“Ankle”).Follow
Range(“b793”).Select
‘ other choices to followend select
end subI cannot seem to get the drop box to take me to cell B793 when I click on ankle in the dropdown box. I must be missing something obvious.
-
WSsdckapr
AskWoody LoungerOctober 14, 2002 at 3:27 pm #624070This might seem trivial/obvious, but I see no code to change the bound column of the combo box to zero (“0”).
If that is not done, the default is one (1) and the combobox.values are the SELECTION value (ankle, arm, etc) and NOT the INDEX value (0,1,2,…). Your “case” works on the index.
Have you checked what the combobox1.values are while debugging?
Steve
-
WSAndrewO
AskWoody Lounger -
WSsdckapr
AskWoody LoungerOctober 14, 2002 at 6:10 pm #624100Is this what you are after?
I did not create a name for everything, only for the Pulldown list (to display) and the address list.
The address is where you want to go for the various item in the pulldown. I did not use the add method, but used the named range, I find it easier to use and update
Steve
-
WSHoratio64
AskWoody Lounger -
WSsdckapr
AskWoody Lounger -
WSAndrewO
AskWoody LoungerOctober 16, 2002 at 11:04 pm #624745Sorry to take so long to look at it.
I think that you’re attempting to do something taht isn’t the way hyperlinks work
In your combo box Case statement you code, for Ankle:Range(“b793”).Hyperlinks(“Ankle”).Follow
Range(“b793”).SelectInstead, I think you should code
Range(“W3”).Hyperlinks(1).Follow
Where “W3” is the cell address of your hyperlink in the example you gave.
-
-
-
-
WSMichaelRead
AskWoody LoungerOctober 10, 2002 at 1:11 am #623083You might try testing the target location in the worksheet change event for subjects you want and then perform your action based on the results. Such as:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 1 And Target.Column = 1 Then If Target.Value = "arm" Then MsgBox ("You selected the topic " & Target.Value) ElseIf Target.Value = "leg" Then MsgBox ("You selected the topic " & Target.Value) End If End If End Sub
WSMichaelRead
AskWoody LoungerOctober 17, 2002 at 12:27 am #624756Like the others, I do not think all of the items are in place to do what you want. There is no form to initialize and I could not find a command button to change the caption. In the attached, I have put data validation, list option in cell B2, where the user can choose options (you can change the range if it is not what you want). The VBA tests the value in B2, where you can put whatever code you like depending on the user’s choice.
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Test post
by
Susan Bradley
5 minutes ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
1 hour, 46 minutes ago -
SSD shuts down on its own
by
CWBillow
6 minutes ago -
OneDrive File Sharing Changes
by
David Clark
9 hours, 49 minutes ago -
OneDrive File Sharing Changes
by
David Clark
11 hours, 53 minutes ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
6 hours, 40 minutes ago -
Today is world backup day
by
Alex5723
3 hours, 30 minutes ago -
Windows .exe on Mint
by
Slowpoke47
13 hours, 26 minutes ago -
Reviewing your licensing options
by
Susan Bradley
1 hour, 43 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
8 hours, 29 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
3 hours, 46 minutes ago -
Making sense of Settings in Windows 11
by
Simon Bisson
5 hours, 51 minutes ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
9 hours, 43 minutes ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
7 hours, 29 minutes ago -
YouTube Ad Blocker Blocker
by
bbearren
7 hours, 40 minutes ago -
Obscure historical facts about Windows
by
Cybertooth
9 hours, 18 minutes ago -
Microsoft Backup
by
Linda2019
1 hour, 2 minutes ago -
What is the best notepad++ version for W7?
by
Picky
8 hours, 32 minutes ago -
What are right steps to move MS 365 Office+OneDrive files from PC to iMac?
by
glnz
1 day, 18 hours ago -
How to move existing MS 365 Office with OneDrive files from PC to new iMac
by
glnz
1 day, 18 hours ago -
How to move MS 365 files (some on OneDrive) from PC to iMac
by
glnz
2 days, 13 hours ago -
Microsoft adding Quick Machine Recovery to Windows 11
by
Alex5723
2 days, 13 hours ago -
Microsoft vs Passwords
by
Alex5723
1 day, 21 hours ago -
Windows 11 Insider Preview build 26200.5516 released to DEV
by
joep517
2 days, 17 hours ago -
Windows 11 Insider Preview build 26120.3653 (24H2) released to BETA
by
joep517
2 days, 17 hours ago -
Two March KB5053606 updates?
by
Adam
2 days, 10 hours ago -
MS Edge Not Updating to v134.0.3124.95 (rel. 27-Mar-2025)
by
lmacri
2 days, 11 hours ago -
Intel® Graphics/Sound Driver updates for 7th-10th Gen Intel® Core™ Processor
by
Alex5723
2 days, 13 hours ago -
Is there a comprehensve way to tranfer ALL current Edge Settings into a new Edge
by
Tex265
2 days, 12 hours ago -
Transferring ALL info/settings from current Firefox to new computer Firefox
by
Tex265
2 days, 12 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.