Change cell colour, after hyperlink activated

russelldt

Board Regular
Joined
Feb 27, 2021
Messages
158
Office Version
  1. 365
Platform
  1. MacOS
I have 3 cells (A1, A2 and A3) that have hyperlinked Mailto functions. When i have sent the email hyperlinked in cell A1, i want that cell to change fill colour from "No Color" to green. The change must be permanent so that it's visible that the email has been sent each time the file is opened. The other 2 cells should operate the same.

Thank you
 
You are welcome.
Glad we were able to help.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You are welcome.
Glad we were able to help.
I have noticed that cell colors are changing in other cells, as well. The range should be columns AO and AP only. Any help here please.
 
Upvote 0
I have noticed that cell colors are changing in other cells, as well. The range should be columns AO and AP only. Any help here please.
OK, you originally said AN:AO. If you want AO:AP, you need to update that, i.e.
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Dim rng As Range
    Dim cell As Range
    
    Set rng = Intersect(Range("AO:AP"), Target)
    If rng Is Nothing Then Exit Sub
    
    For Each cell In rng
        If cell <> "" Then cell.Interior.Color = 5287936
    Next cell
    
End Sub

This will only affect columns AO:AP.
If you have other columns changing color, then either you don't have this exact code, or have other code that may be interfering.
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,717
Members
449,050
Latest member
MiguekHeka

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