View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default Hyperlinks in a drop down menu

Try this below code... It assumes that I named the cell that has the
dropdown list as "DropDown" and that I named the 5 cells that a user could
hyperlink to as "Spot1", "Spot2", etc... You don't have to name the cells, I
just did it for ease of code writing. I also named the worksheet as WS which
refers to the worksheet HyperlinkTest. You would need to put this code in
the Worksheet Change section of the appropriate worksheet through the VBA
editor. You will also have to create a dropdownl list with the appropriate
values.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
Dim WS As Worksheet
Set WS = ThisWorkbook.Worksheets("HyperlinkTest")
If Target.Address = WS.Range("DropDown").Address Then
Select Case WS.Range("DropDown").Value
Case "Spot1"
WS.Range("Spot1").Activate
Case "Spot2"
WS.Range("Spot2").Activate
Case "Spot3"
WS.Range("Spot3").Activate
Case "Spot4"
WS.Range("Spot4").Activate
Case "Spot5"
WS.Range("Spot5").Activate
End Select
End If
Application.ScreenUpdating = True
End Sub

Hope this helps.

Thanks,
Bill Horton

"William Horton" wrote:

There may be a way but I can't think of one offhand. You could just create
regular hyperlinks in each cell and have the user click the appropriate cell.

Or...you could create a regular drop down menu and have a macro run that
would activate the appropriate cell based on the value the user chose from
the drop down menu. You would need to do coding for that though. Probably
in the SheetChange event with the cell where you put the drop down list as
the target.

Hope this helps.

Bill Horton

"B_Ward" wrote:


Does anyone know how to create a drop down menu that contains hyperlinks
to different parts of the same worksheet? Thanks for any help!!!

-Brian


--
B_Ward
------------------------------------------------------------------------
B_Ward's Profile: http://www.excelforum.com/member.php...o&userid=29829
View this thread: http://www.excelforum.com/showthread...hreadid=495502