Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hyperlink box color
In Microsoft excel 2007 I have spreadsheet with hyperlinks to another page
and I would like the hyperlinked cell to be highlighted when I click on the link. Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hyperlink box color
Do you mean you want to highlight the cell the hyperlink jumps to? Try the
following event code... Option Explicit Public PrevCell As Range Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) On Error Resume Next Dim c As Range If Target.Hyperlinks.Count 0 Then Set c = Range(Target.Hyperlinks(1).Range) c.Interior.ColorIndex = 6 PrevCell.Interior.ColorIndex = xlColorIndexNone Set PrevCell = c End If End Sub I used ColorIndex 6, which is bright yellow. Change it to whatever you like. This code needs to be pasted into the ThisWorkbook module of your workbook in the Visual Basic Editor. If you are new to macros, this link to Jon Peltier's site may be helpful: http://peltiertech.com/WordPress/200...e-elses-macro/ Hope this helps, Hutch "Laurie@mtb" wrote: In Microsoft excel 2007 I have spreadsheet with hyperlinks to another page and I would like the hyperlinked cell to be highlighted when I click on the link. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Followed Hyperlink Font Color | Excel Discussion (Misc queries) | |||
Can't make hyperlink function work for hyperlink to website | Excel Worksheet Functions | |||
Can I remove a hyperlink without removing the color of the cell? | Excel Discussion (Misc queries) | |||
How do you change the color of a hyperlink after you click on it? | Excel Worksheet Functions | |||
Intra-workbook hyperlink: macro/function to return to hyperlink ce | Excel Discussion (Misc queries) |