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: www.excelforum.com/member.php...oamp;userid=20336
View this thread: www.excelforum.com/showthread...hreadid=537163You could use an adjacent helper cell that contains a formula like:
=if(x1=quot;quot;,quot;quot;,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(quot;a1quot;)
If .Value = quot;quot; Then
'do nothing
Else
ActiveWorkbook.FollowHyperlink Address:=.Value
'or depending on what's in that list
'ActiveWorkbook.FollowHyperlink Address:=quot;Http://quot; amp; .Value
End If
End With
End Sub
grahammal wrote:
gt;
gt; I have a list of Hyperlinks in cells A1 to A25.
gt; I have named this cell range as 'proliants'.
gt; I've created a dropdown menu that displays this range but it only
gt; displays them
gt; as normal text and not as a list of Hyperlinks.
gt; Can this be achieved in a dropdown menu, comboBox or anything else?
gt; I want to be able to select a Hyperlink from the menu, and away she
gt; goes.
gt;
gt; --
gt; grahammal
gt; ------------------------------------------------------------------------
gt; grahammal's Profile: www.excelforum.com/member.php...oamp;userid=20336
gt; View this thread: www.excelforum.com/showthread...hreadid=537163
--
Dave Peterson
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=quot;quot;,quot;quot;,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(quot;C10quot;)
If .Value = quot;quot; Then
'do nothing
Else
ActiveWorkbook.FollowHyperlink Address:=.Value
'or depending on what's in that list
'ActiveWorkbook.FollowHyperlink Address:=quot;Http://quot; amp; .Value
End If
End With
End Sub
This errors at the
ActiveWorkbook.FollowHyperlink Address:=.Value
line.
Any clues??--
grahammal
------------------------------------------------------------------------
grahammal's Profile: www.excelforum.com/member.php...oamp;userid=20336
View this thread: www.excelforum.com/showthread...hreadid=537163
Have modified the
ActiveWorkbook.FollowHyperlink Address:=.Value
line to read
ActiveWorkbook.FollowHyperlink Address:=quot;D:\Downloads\HP ProLiant Spare
parts\quot; amp; .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: www.excelforum.com/member.php...oamp;userid=20336
View this thread: www.excelforum.com/showthread...hreadid=537163Maybe...
ActiveWorkbook.FollowHyperlink _
Address:=quot;file:////quot; amp; quot;D:\Downloads\HP ProLiant Spare parts\quot; amp; .Value
(Watch the folder name--I wasn't sure about the spaces.)
grahammal wrote:
gt;
gt; Have modified the
gt; ActiveWorkbook.FollowHyperlink Address:=.Value
gt; line to read
gt; ActiveWorkbook.FollowHyperlink Address:=quot;D:\Downloads\HP ProLiant Spare
gt; parts\quot; amp; .Value
gt; This is where all the Word Docs are.
gt; Still no joy.
gt; Do I need to add a '.doc' extention to it perhaps, if so, how?
gt;
gt; --
gt; grahammal
gt; ------------------------------------------------------------------------
gt; grahammal's Profile: www.excelforum.com/member.php...oamp;userid=20336
gt; View this thread: www.excelforum.com/showthread...hreadid=537163
--
Dave Peterson
Have applied modied line, still no go.--
grahammal
------------------------------------------------------------------------
grahammal's Profile: www.excelforum.com/member.php...oamp;userid=20336
View this thread: www.excelforum.com/showthread...hreadid=537163Maybe your data isn't what you posted.
grahammal wrote:
gt;
gt; Have applied modied line, still no go.
gt;
gt; --
gt; grahammal
gt; ------------------------------------------------------------------------
gt; grahammal's Profile: www.excelforum.com/member.php...oamp;userid=20336
gt; View this thread: www.excelforum.com/showthread...hreadid=537163
--
Dave Peterson
- Jul 20 Thu 2006 20:08
Hyperlinks amp; Drop down menu
close
全站熱搜
留言列表
發表留言