Click a Cell and insert a wingding

Solved/Closed
Edwardav - May 11, 2010 at 08:50 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 11, 2010 at 10:11 PM
In excel I am wanting to be able to click a cell to insert a Selected wingding from a list.
But to also beable to click the cell a second time to change to another wingding.
I am trying to create a Tick and cross function for a Checklist. Click once to input a tick click twice input a cross click thrice and cell is cleared.
I have seen this tht was used to change the colour of the cell on click and am having trouble working out if I can modify it or need something completely different.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Target
If Intersect(.Cells, Columns(2)) Is Nothing Or .Count > 1 Then Exit Sub
Select Case .Value
Case ""
.Interior.ColorIndex = 10
Case 1
.Interior.ColorIndex = 6
Case 2
.Interior.ColorIndex = 2
Case 3
.Interior.ColorIndex = xlNone
.Value = vbNullString
Exit Sub
Case Else
Exit Sub
End Select
.Value = .Value + 1
End With

End Sub

ANY suggestions grewatly appreciated.

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 11, 2010 at 10:11 PM
You are on the right path



Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    With Target
        If Intersect(.Cells, Columns(2)) Is Nothing Or .Count > 1 Then Exit Sub
        
            Selection.Font.Name = "Wingdings"
        
            Select Case .Value
            
                'if blank,then put checkmark
                Case ""
                    .Value = "û" ' checkmark character in wingding
                
                'if checkmark, then put cross
                Case Is = "û"
                    .Value = "ü" ' cross mark character in wingding
                
                'if cross, then clear
                Case Is = "û"
                    .Value = ""
                
                'default
                Case Else
                    
                    .Value = ""
            
            End Select

    End With
0