View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Activate hyperlink based on cell value

hi,

It would have helped to know which cells and where the hyperlink was going
but try this. Right click your sheet tab and view code and paste this in.
Enter 99 in a1 and a hyperling is created in b1 to sheet 1 a1

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 99 Then
ActiveSheet.Hyperlinks.Add Anchor:=Range("B1"), Address:="", _
SubAddress:="Sheet1!A1", TextToDisplay:="MyText"
End If
End Sub

Mike

"veggies27" wrote:

I am trying to automatically activate a hyperlink if a certain cell has a
value in it. Is there a way this is possible?