Anthony G.
Active Member
- Joined
- Mar 24, 2002
- Messages
- 465
Hello to all. James was kind enough to post the following code foe me. Although it does format to my liking, it also highlights the entire range each time a different cell is updated. Any suggestions?
Here's the code:
Private Sub Worksheet_Change(ByVal Update As Range)
Sheets("Sheet1").Unprotect Password:="Anthony"
If Intersect(Update, Range("A1:A5")) Is Nothing Then Exit Sub
With Update
Range("A1:A5").Select
.Font.Bold = True
.Font.Italic = True
With.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
End With
Sheets("Sheet1").Protect Password:="Anthony"
End Sub
Thanks,
Anthony
Here's the code:
Private Sub Worksheet_Change(ByVal Update As Range)
Sheets("Sheet1").Unprotect Password:="Anthony"
If Intersect(Update, Range("A1:A5")) Is Nothing Then Exit Sub
With Update
Range("A1:A5").Select
.Font.Bold = True
.Font.Italic = True
With.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
End With
Sheets("Sheet1").Protect Password:="Anthony"
End Sub
Thanks,
Anthony