Hello All,
I have the the following code in the attached excel sheet.
I would like to have it work the same for the following
cell d21 when it contains "" show Width
and e21 when it contains "" show Height
Also, if i click out of the cell twice it goes to black instead of grey??
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$21" Then
If Target.Value = "Length" Then
Target.Font.ColorIndex = 15
Target.Value = ""
Exit Sub
End If
End If
If [C21].Value = "" Then
[C21].Value = "Length"
[C21].Font.ColorIndex = 15
Else
[C21].Font.ColorIndex = xlAutomatic
End If
End Sub
Bookmarks