How to insert a checkmark with vba

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
563
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have a pass or fail option buttons. if the user selects "pass" option button a green check mark appears on the designated cell on the spreadsheet. The problem is I can't find a check mark in ascii only in Unicode. So I guess my question is how can I display a check mark and turn it green using colorindex?
Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Why couldn't you do it in code?

You can set the font of a cell, and what goes in it.
 
Upvote 0
First, let me thank you for your help on other problems. Secondly, Let me apologize for my ignorance but can you give an example please?
 
Upvote 0
Hi

The checkmark is defined in the Unicode set and most fonts support Unicode, so using one of the usual fonts (Arial, Calibri, Verdana, Times New Roman, etc.), try:

Code:
ActiveCell.Value = ChrW(&H2713)
 
Upvote 0
Not quite certain I understand. Sorry. The font is set to Calibri. Also forgot to mention that I am using Excel 2007, if that helps. Anyway here's my code and thanks again. Also, how do I change color of check mark to green?

If OptionButton1 = True Then
Cells(emptyRow, 7).Value = ActiveCell.Value = ChrW(&H2713)
Else
Cells(emptyRow, 7).Value = "X"
End If
 
Upvote 0
Not quite certain I understand. Sorry. The font is set to Calibri. Also forgot to mention that I am using Excel 2007, if that helps. Anyway here's my code and thanks again. Also, how do I change color of check mark to green?

If OptionButton1 = True Then
Cells(emptyRow, 7).Value = ActiveCell.Value = ChrW(&H2713)
Else
Cells(emptyRow, 7).Value = "X"
End If

Try:
instead of

Code:
Cells(emptyRow, 7).Value = ActiveCell.Value = ChrW(&H2713)

this

Code:
Cells(emptyRow, 7).Value = ChrW(&H2713)
 
Upvote 0
It worked!!!!! Thank you very much. Is there a way to also change the color of the check mark to green?
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,739
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top