Solved

Excel VBA - pasting Windings2 characters

Posted on 2016-11-04
5
84 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

Independent Software Vendors: 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

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

730 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