Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with MsgBox And Unicode

Status
Not open for further replies.

Nightsoft

Programmer
Aug 23, 2001
50
DK
Hi!

I'm Using word 97 And I'm trying show a Unicode in a Msgbox. This dosn't
seem to come out as I expected. All it does is write some useless stuff in
the Msgbox.
My msgbox is being called using this Makro code. :

Sub ShowInfoOnMarkedSign()

Dim sign As Object
Dim msg As String
Dim Answer As String

If Selection.Type = wdSelectionIP Then
Exit Sub
Else
Set sign = Selection.Range.Characters.First

End If

msg = "Font:" & vbTab & Selection.Font.Name & vbCr
msg = msg & "Sign:" & vbTab & sign & vbCr
msg = msg & "ASCII:" & vbTab & CStr(Asc(tegn)) & vbCr
' Here I would like to show the Unicode Sign. But A dum line comes instead??
msg = msg & "Unicode:" & vbTab & CStr(AscW(tegn))
Answer = MsgBox(msg & vbCr , vbOKOnly, "Nightsoft")
End Sub

I'm beginning to think that the Sign code used for MsgBox, is a windows
System font. If so, could I then in VBA change the attributes for the MsgBox
font selection??

I've looked through the VBA help ... Found nothing there. I'm currently
searching through Microsoft's Knowledge base. but so far no luck. I'll Keep
on searching

I'f anyone have a hint or even a Solution, I would be gratefull. This thing
is bugging me. And I know it can be done. The question is just how.

Dennis A Jensen
dennis@nightsoft.dk
Denmark



Machine code Rocks:)
 
Mis translating
The two places where it says (tegn) it should have been (sign).
I just forgot them when translating from DK to EN Machine code Rocks:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top