ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Hyperlinks & Drop down menu (https://www.excelbanter.com/excel-discussion-misc-queries/85819-hyperlinks-drop-down-menu.html)

grahammal

Hyperlinks & Drop down menu
 

I have a list of Hyperlinks in cells A1 to A25.
I have named this cell range as 'proliants'.
I've created a dropdown menu that displays this range but it only
displays them
as normal text and not as a list of Hyperlinks.
Can this be achieved in a dropdown menu, comboBox or anything else?
I want to be able to select a Hyperlink from the menu, and away she
goes.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


Dave Peterson

Hyperlinks & Drop down menu
 
You could use an adjacent helper cell that contains a formula like:

=if(x1="","",hyperlink(x1))

(where x1 contains the data|validation (is that what you used for the
dropdown?))

Or you could plop a button near the dropdown that does the linking.

I'd put a little button from the Forms toolbar next to the dropdown.

I'd assign this macro to it:

Option Explicit
Sub testme()
With ActiveSheet.Range("a1")
If .Value = "" Then
'do nothing
Else
ActiveWorkbook.FollowHyperlink Address:=.Value
'or depending on what's in that list
'ActiveWorkbook.FollowHyperlink Address:="Http://" & .Value
End If
End With
End Sub



grahammal wrote:

I have a list of Hyperlinks in cells A1 to A25.
I have named this cell range as 'proliants'.
I've created a dropdown menu that displays this range but it only
displays them
as normal text and not as a list of Hyperlinks.
Can this be achieved in a dropdown menu, comboBox or anything else?
I want to be able to select a Hyperlink from the menu, and away she
goes.

--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


--

Dave Peterson

grahammal

Hyperlinks & Drop down menu
 

I have tried both methods but no joy yet.

My Hyperlink list is in cells A2 to A60. I've named this range '
proliant '.
All these links are to Word documents on the same drive.

My drop down menu is in cell C10 and was created using
Data/Validation.
I tried putting =if(C10="","",hyperlink(C10)) in cell C12 but I get a
'Cannot open the specified file' message.

I created a Button from the Forms menu and put the following in it.

Option Explicit
Sub testme()
With ActiveSheet.Range("C10")
If .Value = "" Then
'do nothing
Else
ActiveWorkbook.FollowHyperlink Address:=.Value
'or depending on what's in that list
'ActiveWorkbook.FollowHyperlink Address:="Http://" & .Value
End If
End With
End Sub

This errors at the
ActiveWorkbook.FollowHyperlink Address:=.Value
line.

Any clues??


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


grahammal

Hyperlinks & Drop down menu
 

Have modified the
ActiveWorkbook.FollowHyperlink Address:=.Value
line to read
ActiveWorkbook.FollowHyperlink Address:="D:\Downloads\HP ProLiant Spare
parts\" & .Value
This is where all the Word Docs are.
Still no joy.
Do I need to add a '.doc' extention to it perhaps, if so, how?


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


Dave Peterson

Hyperlinks & Drop down menu
 
Maybe...

ActiveWorkbook.FollowHyperlink _
Address:="file:////" & "D:\Downloads\HP ProLiant Spare parts\" & .Value

(Watch the folder name--I wasn't sure about the spaces.)

grahammal wrote:

Have modified the
ActiveWorkbook.FollowHyperlink Address:=.Value
line to read
ActiveWorkbook.FollowHyperlink Address:="D:\Downloads\HP ProLiant Spare
parts\" & .Value
This is where all the Word Docs are.
Still no joy.
Do I need to add a '.doc' extention to it perhaps, if so, how?

--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


--

Dave Peterson

grahammal

Hyperlinks & Drop down menu
 

Have applied modied line, still no go.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


Dave Peterson

Hyperlinks & Drop down menu
 
Maybe your data isn't what you posted.

grahammal wrote:

Have applied modied line, still no go.

--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=537163


--

Dave Peterson


All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com