I have as simple module which changes the font based on the name I select inside my worksheet. The code works well when I'm in the VBE and press F5, but when I'm in the worksheet and select a choice in the cell like "YES", the font reverts back to the default font. I know I'm doing something stupid with my code, but can't figure out what. Can someone help please? See code below.
Thanks so much!
Ken Mc
Thanks so much!
Ken Mc
Code:
Sub test()
Dim cell As Object
For Each cell In Range("B2:M35")
If UCase(cell.Value) Like "*YES*" Or UCase(cell.Value) Like "*MODERATE*" Then
cell.Font.Name = "Comic Sans MS"
cell.Font.Bold = True
End If
Next cell
End Sub