Link to home
Start Free TrialLog in
Avatar of cbutton
cbuttonFlag for United States of America

asked on

In VBA print "box" (Windings q)

I have a VBA macro that prints a checkoff list. I want it to print a box, which I can get in Word with a Windings letter q. I have the followng in my code:

    Selection.Font.Name = "Windings"
    Selection.TypeText Text:="q"

but it just prints the letter q. If I manually select the q and then select Format|Font|Wingdings, the q gets converted to the box I want.
Avatar of byundt
byundt
Flag of United States of America image

Hi cbutton,
You didn't say which application you were using. In Excel, you can do it like this:

Sub SquareBox()
With Selection
    .Font.Name = "Wingdings"
    .Value = "q"
End With
End Sub

Cheers!

Brad
ASKER CERTIFIED SOLUTION
Avatar of david_barker
david_barker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cbutton

ASKER

Sorry I didn't name the application. It is MS Word.

I'll try the two suggestions when I get back this afternoon.l
Avatar of cbutton

ASKER

david_barker: I don't know how many times I looked at that "windings" and saw "wingdings." I'm sure glad you spotted it! Thanks.