Check Mark

G

Guest

Can someone tell me the VBA code that will place a check mark in a cell.

I need the code so that when I place any character in a specified range,
that the value will change to a check mark when I leave that cell.

Please Help!! Thanks
 
G

Gord Dibben

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
With Target
.Value = Chr(252)
.Font.Name = "WingDings"
End With
Application.EnableEvents = True
End If
End Sub

This is event code. Right-click on the sheet tab and "View Code".

Copy and paste into that module.

Adjust the range to suit.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top