Announcement

Collapse
No announcement yet.

Show Special Characters In MsgBox (VBA Message Box)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show Special Characters In MsgBox (VBA Message Box)



    Split off from http://www.ozgrid.com/forum/showthread.php?t=131233


    Thanks AAE and Tony T. While MsgBox is indeed an intrinsic function, it is possible to insert special characters in the prompt string such as this:
    Code:
    Dim sPrompt As String
        sPrompt = "Here's a unicode character " & """" & ChrW(245) & """"
        MsgBox (sPrompt)
    Is there no way to insert an image/icon in the prompt string in the above manner?

    BTW, it appears that the ChrW function only resolves CharCodes in the range of 0-382. Can one specify the CharCode so that the range of unicodes is displayed?
    Last edited by Dave Hawley; January 22nd, 2009, 09:59.
    Many thanks,

    - Al

  • #2
    Re: Include Image In VBA Message Box (MsgBox)

    According to the help -

    The ChrW function returns a String containing the Unicode character except on platforms where Unicode is not supported, in which case, the behavior is identical to the Chr function
    If you increase the number used in chrw and the result of displaying that character in the msgbox function is a "?", then it simply means that the O/S doesnt currently supprt that character.

    Ger

    Check out our new reputation system. Click on the "star" under the post!
    _______________________________________________

    There are 10 types of people in the world. Those that understand Binary and those that dont.

    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25...

    The BEST Lookup function of all time

    Dynamic Named Ranges are your bestest friend

    _______________________________________________

    Comment


    • #3
      Re: Include Image In VBA Message Box (MsgBox)

      sPrompt = "Here's a unicode character " & """" & ChrW(245) & """"
      MsgBox (sPrompt)
      ChrW(245) Doesn't require Unicode; it's from the standard 255-character set, and is the same as CHAR(245) in the user interface.
      Entia non sunt multiplicanda sine necessitate.

      Comment


      • #4
        Re: Include Image In VBA Message Box (MsgBox)

        Thanks Ger and shg. I didn't know that a "?" meant that the O/S didn't support the character. I thought that perhaps I had to specify it as a hex number to display it. And, yes, ChrW(245) was only an illustration.
        Many thanks,

        - Al

        Comment


        • #5
          Re: Show Special Characters In MsgBox (VBA Message Box)

          Al

          There is no way to insert/show an image in a standard messagebox.

          It just isn't going to happen unless you use a userform or some sort of Windows API voodoo.
          Boo!

          Comment


          • #6
            Re: Show Special Characters In MsgBox (VBA Message Box)

            Okay ... I respectfully give up!
            Many thanks,

            - Al

            Comment


            • #7
              Re: Show Special Characters In MsgBox (VBA Message Box)

              hi,Al4
              There is a addin messagebox.
              http://www.h3.dion.ne.jp/~sakatsu/kt...es_English.htm
              regards/junho lee

              Comment


              • #8


                Re: Show Special Characters In MsgBox (VBA Message Box)

                Hey junho lee,

                That looks very cool. Thanks for responding.
                Many thanks,

                - Al

                Comment

                Working...
                X