Thread: [Solved] Run Time error 1004
View Single Post
 
Old 06-13-2024, 04:42 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2021
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Protect UserInterfaceOnly:=True, AllowFormattingCells:=True
Cells.FormatConditions.Delete
Target.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
Target.FormatConditions(1).Interior.ColorIndex = 40
End Sub
Reply With Quote