Unicode in Msgbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Pls tell me how can I display message in Msgbox with Umicode character ?
Thanks in advance.
 
Someone please correct me if I'm wrong, but my tests so far seem to indicate
that you can't do this in a message box, but you can do it using an Access
form. Here's my test ...

Private Sub Command4_Click()


Me.txtUnicodeChar = ChrW(CLng("&h" & Me.txtUnicodeNumber))
Me.lblUnicodeChar.Caption = ChrW(CLng("&h" & Me.txtUnicodeNumber))

MsgBox Me.txtUnicodeChar

End Sub

If I enter into the text box 'txtUnicodeNumber' the hexadecimal value
'FEDA', which according to the Windows Character Map applet is the Unicode
code for the Arabic letter Kaf, Final Form, the Arabic character is
correctly displayed in the text box and in the label, but not in the message
box.

Here's a link to a search result that might be of interest ...

http://www.google.ie/search?hl=en&q=vba+unicode
 
Thanks Lynn.

One of the articles in that Google search result that I posted earlier says
that VBA uses Unicode internally, but automatically converts to ANSI when
calling API functions. I'm thinking that perhaps VBA calls an API function
to display the message box, and perhaps that might explain the difference.
That's just a guess on my part, though.

Anyhow, the solution seems to be to use a form to display the message rather
than a message box. Perhaps Arvin's Custom MsgBox Creator might help ...

http://www.datastrat.com/DataStrat2.html
 
Yes. I'm using form to display messages. Just wonder if can I display Msgbox
that refer to a table, using Dlookup ? Or any other solution ? I don't want
to have too many form just to displayt messages ?
Best regards.
 
Take a look at Arvin's Custom MsgBox Creator at the URL I posted earlier.
It's a while since I looked at it, but if I remember correctly, I think it
will allow you to use one customizable form to display many different
messages.
 
Thanks. I'll try it.

Brendan Reynolds said:
Take a look at Arvin's Custom MsgBox Creator at the URL I posted earlier.
It's a while since I looked at it, but if I remember correctly, I think it
will allow you to use one customizable form to display many different
messages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top