Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unicode in Msgbox

682 views
Skip to first unread message

Khoa

unread,
Sep 5, 2006, 9:50:01 AM9/5/06
to
Pls tell me how can I display message in Msgbox with Umicode character ?
Thanks in advance.

Brendan Reynolds

unread,
Sep 5, 2006, 12:25:50 PM9/5/06
to
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

--
Brendan Reynolds
Access MVP


"Khoa" <Kh...@discussions.microsoft.com> wrote in message
news:7CE354B2-F37C-4EED...@microsoft.com...

Lynn Trapp

unread,
Sep 5, 2006, 3:00:21 PM9/5/06
to
I think you are totally right, Brendan.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html

"Brendan Reynolds" <bren...@discussions.microsoft.com> wrote in message
news:u3Ho2fQ0...@TK2MSFTNGP02.phx.gbl...

Brendan Reynolds

unread,
Sep 5, 2006, 5:26:35 PM9/5/06
to

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

--
Brendan Reynolds
Access MVP

"Lynn Trapp" <ltrapp...@ltcomputerdesigns.com> wrote in message
news:%23$faK2R0G...@TK2MSFTNGP05.phx.gbl...

Khoa

unread,
Sep 5, 2006, 8:36:01 PM9/5/06
to
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.

Brendan Reynolds

unread,
Sep 6, 2006, 5:15:41 AM9/6/06
to
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.

--
Brendan Reynolds
Access MVP

"Khoa" <Kh...@discussions.microsoft.com> wrote in message

news:9973E99A-713A-4A1E...@microsoft.com...

Khoa

unread,
Sep 6, 2006, 8:31:01 PM9/6/06
to
Thanks. I'll try it.
0 new messages