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, 7 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
-
X Suspends Encrypted DMs
by
Alex5723
1 hour, 52 minutes ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
2 hours, 10 minutes ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
2 hours, 47 minutes ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 hours, 24 minutes ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
2 hours, 47 minutes ago -
Enabling Secureboot
by
ITguy
6 hours, 33 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
11 hours, 18 minutes ago -
No more rounded corners??
by
CWBillow
7 hours, 6 minutes ago -
Android 15 and IPV6
by
Win7and10
1 hour, 7 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
23 hours, 39 minutes ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
1 day, 2 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
20 hours, 55 minutes ago -
Windows Update orchestration platform to update all software
by
Alex5723
1 day, 9 hours ago -
May preview updates
by
Susan Bradley
21 hours, 3 minutes ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
12 hours, 38 minutes ago -
Just got this pop-up page while browsing
by
Alex5723
1 day, 1 hour ago -
KB5058379 / KB 5061768 Failures
by
crown
22 hours, 56 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
1 hour, 7 minutes ago -
At last – installation of 24H2
by
Botswana12
2 days, 1 hour ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
12 hours, 14 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
2 days, 13 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
11 hours, 50 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
3 days, 2 hours ago -
Another test post
by
gtd12345
3 days, 3 hours ago -
Connect to someone else computer
by
wadeer
2 days, 21 hours ago -
Limit on User names?
by
CWBillow
3 days ago -
Choose the right apps for traveling
by
Peter Deegan
2 days, 14 hours ago -
BitLocker rears its head
by
Susan Bradley
1 day, 22 hours ago -
Who are you? (2025 edition)
by
Will Fastie
1 day, 21 hours ago -
AskWoody at the computer museum, round two
by
Will Fastie
2 days, 16 hours ago
Recent blog posts
Key Links
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.