How do I display a messagebox with unicode characters in VBA?
问题 I have a string containing unicode characters in VBA. I want to display that string in a message box containing it. However, instead of the string, the message box only contains a questionmark. MCVE: Dim s As String s = ChrW(5123) MsgBox s 回答1: MsgBox is not compatible with non-ANSI unicode characters. We can display message boxes with the WinAPI MessageBoxW function, however, and that is . Let's declare that function, and then create a wrapper for it that's nearly identical to the VBA MsgBox