I am using the following code on a few different sheets for input from an audit. I don't know if it is the best way to collect input but I like it. What I would like to do is reset the column with the wingdings font "o" every time the user changes sheets. I can not quite seem to figure out the right syntax. How do I make Range("C2:C20") all "o" every time I select the sheet?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("C2:C20")) Is Nothing Then
Cancel = True
With Target
.Font.Name = "Wingdings"
.Font.Size = 20
.HorizontalAlignment = xlCenter
End With
If Target.Value = "o" Then
Target.Value = "þ"
Target.Font.ColorIndex = 10
ElseIf Target.Value = "þ" Then
Target.Value = "ý"
Target.Font.ColorIndex = 3
ElseIf Target.Value = "ý" Then
Target.Value = "o"
Target.Font.ColorIndex = 0
Else
Target.Value = "þ"
Target.Font.ColorIndex = 10
End If
End If
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("C2:C20")) Is Nothing Then
Cancel = True
With Target
.Font.Name = "Wingdings"
.Font.Size = 20
.HorizontalAlignment = xlCenter
End With
If Target.Value = "o" Then
Target.Value = "þ"
Target.Font.ColorIndex = 10
ElseIf Target.Value = "þ" Then
Target.Value = "ý"
Target.Font.ColorIndex = 3
ElseIf Target.Value = "ý" Then
Target.Value = "o"
Target.Font.ColorIndex = 0
Else
Target.Value = "þ"
Target.Font.ColorIndex = 10
End If
End If