Wanna insert checkmark with code

Z

zSplash

My spreadsheet is in Arial but when I want to do a checkmark, I need
Wingdings2 font. So, I actively set the font for the cell as Wingdings2 and
then set the value. But, my code only gives me a P (when it should give me
a checkmark):

Sub checkmark()
With ActiveCell
.Font.Name = "Wingdings2"
.Value = "P"
End With
End Sub

The activecell's font becomes Wingdings2, but the character that shows is
"P". I know the value of the checkmark is Wingdings 61520, because when I
use the numeric keypad with the alternate key, and enter 61520, I get a
checkmark. How do I enter a checkmark in my active cell using code?

TIA!!
 
J

JW

My spreadsheet is in Arial but when I want to do a checkmark, I need
Wingdings2 font. So, I actively set the font for the cell as Wingdings2 and
then set the value. But, my code only gives me a P (when it should give me
a checkmark):

Sub checkmark()
With ActiveCell
.Font.Name = "Wingdings2"
.Value = "P"
End With
End Sub

The activecell's font becomes Wingdings2, but the character that shows is
"P". I know the value of the checkmark is Wingdings 61520, because when I
use the numeric keypad with the alternate key, and enter 61520, I get a
checkmark. How do I enter a checkmark in my active cell using code?

TIA!!

It Wingdings 2, with a space. Make that adjustment and your code will
work.
Sub checkmark()
With ActiveCell
.Font.Name = "Wingdings 2"
.Value = "P"
End With
End Sub
 
Z

zSplash

Hej, Thanks, J.W.
I changed to .Value = "P " and it still doesn't work. (vbSpace isn't right,
either)
Any other suggestions??

st.
 
Z

zSplash

Oh, now I see -- "It's Wingdings 2 with a space" = "Wingdings 2".
Thanks so much, JW

st.
 

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

Top