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
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