Solved

Excel VBA - pasting Windings2 characters

Posted on 2016-11-04
5
101 Views
Last Modified: 2016-11-04
I need to insert these Windings2 characters into a cell like this.
Font Windings2
Normally I would Copy from the Character Map, while recording a macro, and adapt the code. But when I do that with these characters I get ... nothing!

What I'm looking for is:
Range("D4").Value = [what goes here?]
0
Comment
Question by:hindersaliva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 41875027
Set the font for the cell to Wingdings 2 and then something like this
Range("D4").Value ="PP"
would give you two checkmarks. You need to determine the equivalent normal text for the characters you want.
0
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 41875034
Actually the semicircleup is Chr(188), the semicircledown is chr(189) and the empty circle is 154.  I couldn't find the solid circle but a octagon is 197  so try

Range("A1").Value = Chr(188) & Chr(197) & Chr(197) & Chr(197) & Chr(189) & Chr(154)
0
 

Author Comment

by:hindersaliva
ID: 41875036
It's the "PP" I'm looking for. I found this
https://www.myfonts.com/fonts/ascender/wingdings/2/

Where I found this
Example character
I can copy/paste to make the character appear in the cell, but when I copy it to the IDE I get a '?'.
Cleary I'm not doing it correctly :(
0
 

Author Comment

by:hindersaliva
ID: 41875040
Ah! Solid circle turns out to be Chr(152)

Thanks Martin. I'm sorted!
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 41875047
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question