Highlight linked cell

Brian F

Active Member
Joined
Aug 31, 2009
Messages
256
I want to highlight the cell chosen by a link.

I have a list in the first column of my worksheet (in alphabetical order so I can find them) that corresponds to the column headings (inspection types in this case). For example, if I click the link in the first column for "Foundation Inspections" the link chooses the cell at the top of the column "Foundation Inspections". There are 80 different links, corresponding to 80 different column heading, corresponding to 80 different inspection types. It is difficult to see which column the link has chosen. I want the chosen cell (the object of the link, the cell the cursor now sits on) to highlight a bright color so I can find it.

Help is always appreciate! Thank you in advance for any help you can give.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Maybe domething like this :

(Code in the worksheet module)

Code:
Private prev As Range

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

    ActiveCell.Interior.ColorIndex = 3
    Set prev = ActiveCell

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    On Error Resume Next
        prev.Interior.ColorIndex = xlNone
    On Error GoTo 0
   
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,113
Members
452,545
Latest member
boybenqn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top