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
-
How start headers and page numbers on page 3?
by
Davidhs
2 hours, 34 minutes ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
4 minutes ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
11 hours, 15 minutes ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
11 hours, 17 minutes ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
58 minutes ago -
Firefox 139
by
Charlie
13 hours, 39 minutes ago -
Who knows what?
by
Will Fastie
6 hours, 22 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
12 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
6 hours, 24 minutes ago -
Misbehaving devices
by
Susan Bradley
14 hours, 8 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
1 day, 17 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
1 hour, 58 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
1 day, 16 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
15 hours, 43 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
1 day, 6 hours ago -
Rufus is available from the MSFT Store
by
PL1
1 day, 14 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
2 days, 17 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
17 hours, 30 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
16 hours, 12 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
2 days, 13 hours ago -
Office gets current release
by
Susan Bradley
2 days, 16 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
4 days, 6 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
3 days, 14 hours ago -
Stop the OneDrive defaults
by
CWBillow
4 days, 6 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
4 days, 16 hours ago -
X Suspends Encrypted DMs
by
Alex5723
4 days, 19 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
4 days, 19 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
4 days, 19 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
4 days, 20 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
4 days, 8 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.