+ Reply to Thread
Results 1 to 8 of 8

Displaying Unicode Characters in ActiveX Label

  1. #1
    Registered User
    Join Date
    10-14-2010
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Displaying Unicode Characters in ActiveX Label

    I have an ActiveX Label control on a worksheet; the Caption text is based on cell selection. The source of the Caption text is from a cell indexed in a Named Range on a separate worksheet.

    Sometimes the Caption text contains Mathematical Operator Symbols (Unicode(hex) Character Codes 2264 & 2265).

    Both of these Unicode Characters initially display as "=" in the Label control. However, clicking on the Label causes the following:
    1. The Label slightly increases in size,
    2. Character spacing slightly increases, and
    3. The Mathematical Operator Symbols are displayed correctly.

    As soon as the Mouse Pointer is moved beyond the Label border, the Label reverts to its initially displayed state.

    NOTE: The Symbols display correctly in a Label on a UserForm.

    Thanks in advance for any assistance.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Displaying Unicode Characters in ActiveX Label

    Can you post workbook example to illustrate the problem
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-14-2010
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Displaying Unicode Characters in ActiveX Label

    Example file created.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Displaying Unicode Characters in ActiveX Label

    Not sure there is anything you can do to make the activex control display correctly.

    Can you not use a Shape instead to display the information?

  5. #5
    Registered User
    Join Date
    10-14-2010
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Displaying Unicode Characters in ActiveX Label

    Thanks Andy.

    Yes, using a Shape with a TextFrame is one of a number of alternative solutions.

    I would like to see if anyone out there could provide an explaination as to why the ActiveX Label control displays the Unicode characters correctly on a UserForm, but not as an embedded control in a Worksheet.

    I did some further testing & discovered that this display problem also exists when using the MsgBox function or when printing the string in the VBE Immediate Window.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Displaying Unicode Characters in ActiveX Label

    Msgbox and Immediate window show ? due to not supporting unicode characters.

  7. #7
    Registered User
    Join Date
    10-14-2010
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Displaying Unicode Characters in ActiveX Label

    It seems like Windows executes some kind of "Evaluate" function on the embedded Label text when the Label is clicked.

    Is there a resource that you can point me to where I can find out more about the associated Windows event(s)?

    Thanks Again,
    Donald

  8. #8
    Registered User
    Join Date
    10-14-2010
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Displaying Unicode Characters in ActiveX Label

    Just a quick update. I switched from using an ActiveX Label control to a Text Box Shape & all is working fine.

    One last side note. Turns out that this issue wasn't really a Unicode issue after all. I found the math symbols I needed ("Less Than or Equal to" and "Greater Than or Equal to") in the Symbol font in the ASCII 0 - 255 range. However, the Embedded ActiveX Label control still exhibited the same behavior - it initially displays both of these symbols as "=". When the Label is clicked, the correct symbols are displayed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1