Thread: Link code
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don P Don P is offline
external usenet poster
 
Posts: 17
Default Link code

Phil,

One way:

Place this in the sheet module:


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Union(Range("a1"), Range("e1"), Range("h1")).Select
With Selection
If .Interior.ColorIndex = xlNone Then
.Interior.ColorIndex = 6
Else
.Interior.ColorIndex = xlNone
End If
End With
End Sub

Assuming that the linked cells are A1, E1, and H1 (change to your linked
cells), each time you double click on this sheet, the linked cells will turn
yellow. Double click again and they go back to no color.

Don Pistulka


"Phil Hageman" wrote in message
...
I would like to place code in a Module, or ThisWorkbook,
that would highlight cells with links to other places.
Something like a conditional format. It should be
something I can turn on, look at the cells, then turn off -
don't want the highlighting permanent. What code would do
this, and where would I put it?

Thanks, Phil