Re: Conditional Hyperlink?
From: JulieD (JulieD_at_hctsReMoVeThIs.net.au)
Date: 01/31/05
- Next message: JulieD: "Re: Conditional Hyperlink?"
- Previous message: Paul B: "Re: Add color to worksheet tab"
- Next in thread: JulieD: "Re: Conditional Hyperlink?"
- Maybe reply: JulieD: "Re: Conditional Hyperlink?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 23:40:16 +0800
Hi
AFAIK you'll need to use code to achive this, e.g.
---
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo err_Handler
If Target.Address = "$A$1" And Target.Value = 1 Then
Range("B1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="KP", TextToDisplay:="KP"
Else
Range("B1").Value = ""
End If
err_Handler:
Application.EnableEvents = True
End Sub
----
to use the code, right mouse click on the sheet you want to run it against,
choose view code
and copy & paste the above in - if you have any red lines, go to the end of
the first one and press delete - this should overcome any wordwrap problems.
Hope this helps
Cheers
JuileD
<mas_it_2000@yahoo.com> wrote in message
news:1107176510.278869.262340@f14g2000cwb.googlegroups.com...
> Hi everyone,
>
> I want to do thing like this: If A1=1, then hyperlink B2 and KP (where
> kp is a Name Box that exist somewhere in the workbook), otherwise leave
> B2 blank.
>
> How can I do so?
>
> Regards,
> Mike
>
- Next message: JulieD: "Re: Conditional Hyperlink?"
- Previous message: Paul B: "Re: Add color to worksheet tab"
- Next in thread: JulieD: "Re: Conditional Hyperlink?"
- Maybe reply: JulieD: "Re: Conditional Hyperlink?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|