• Symbols on VBA UserForm (HTML symbols)

    Author
    Topic
    #477557

    There are two symbols, ballot box and ballot box with x, which we want to offer as symbols to be added to a Word document. The symbols are ☐ and ☒. How do I add those to a document using Selection.TypeText? Also, will I be able to use the same sort of thing to add them to a list box in a VBA form?Thanks.

    Viewing 3 reply threads
    Author
    Replies
    • #1286254

      Using the Wingdings font the character values are 168 & 120 respectively so use Chr(168), etc.:cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1286276

      The following should work.

      .AddItem = Chr(120) & ” ” & {text or variable here}

      The only problem I see here is that the font in the ListBox may not have those characters at those positions.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1286356

        That’s why I originally thought that Hex would be more reliable. In my original message, I used the Hex code, but I see it got “translated” to the actual symbols.

    • #1286486

      I don’t think you can change the font inside a userform’s listbox control. Can you use the checkbox control instead?

      • #1286514

        I could put this directly on the Ribbon, but that wouldn’t be consistent with our other symbols. I have a non-modal user form which the user can position wherever it’s handy, like a floating palette, and it remains open after inserting accented letters, typographic symbols, etc.

      • #1286823

        It is possible to change the font of a list or combo box, but — of course — it changes the font for the entire control. The only two Wingding items are these 2 boxes, so the font setting doesn’t help me.

    • #1286826

      In Word 2010, I can use ChrW(&Hnnnn) to insert Unicode symbols into a ListBox. See attached. (I got the numbers by scrolling through the Arial Unicode MS character set in the Insert>Symbol dialog.)

    Viewing 3 reply threads
    Reply To: Symbols on VBA UserForm (HTML symbols)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: