How can I display special characters in VB controls ?

BarryTang used Ask the Experts™
I would like to display some special characters
( e.g. °(ascii 176), ± (ascii 177)) in a VB form ( or other VB controls ).

How can I do it by program ?

Thank you

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Try use Chr and Asc function in VB.


Hi BarryTang,

You can use Chr function which returns a string corresponding to character code.

Hope this helps
Yes it can be done find a font that displays all the special characters and then set the label or textbox to that font then user character function chr() and others to display it...
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


Hello, everybody :

Thanks for response,
but I still cannot display my result.

I use the following code that try to display
the character : ± ( for font : Arial )

    Text1.Font = "Arial"
    Text1.Text = Chr(177)

    Label1.Font = "Arial"
    Label1.Caption = Chr(177)

Please advice


I don't know what you mean it CANNOT WORK.

I just put in your exact code and it seems to work fine.

Yes ventond is correct it works at my place too...
try refreshing the controls after assigning the values...


CANNOT WORK mean cannot see anything in the label or textbox

If I input as follows

    Label1.Font = "Arial"
    Label1.Caption = Chr(65) & Chr(67)

the result on the label is "AC", it is OK

But if I change the caption to

       Label1.Caption = Chr(177)

it cannot see anything

  or   Label1.Caption = Chr(65) & Chr(177) & Chr(67)

it just display "A"

I still don't the reason.
Is the working environment related ?
( I am using VB6(SP3) on Windows 98 Chinese Version )

Ryan ChongSoftware Team Lead

Try ChrW() function ?


I try the chrw() function and find that it can display
some of the character correctly like chr(177) as ±

However, some displayed character is totally different
from the ascii table
   like chr(169) should be ©
   but VB display just a letter c and missing the circle ??

other examples are chr(129),chr(130),chr(131),....

Can you solve it or give me some explaination for this ?

Thank you

You say that you are on the chinese version, what does your character map say value 177 for font Arial looks like?
You have 17 opened questions as of this date.  
I will be posting in each of these questions.  
Please take care of your opened questions older than 30 days by clicking on your logon name link and looking for UnlockedQ or using the links I am providing below.  
Please finalize these within 72 hours or I will ask administration to look into your account at that point.  If you have questions, please ask and I will provide assistance.

Thank you.
Author of the Year 2009

It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept ryancys's comment(s) as an answer.

BarryTang, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer
per recommendation

Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial