Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 8 of 8

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

  1. #1
    Join Date
    17th January 2009
    Posts
    11

    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:
    VB:
    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 at 09:59.
    Many thanks,

    - Al

  2. #2
    Join Date
    16th June 2005
    Location
    Dublin
    Posts
    4,555

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

    _______________________________________________

  3. #3
    Join Date
    12th September 2006
    Location
    The Great State of Texas
    Posts
    4,323

    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.
    MS MVP - Excel

  4. #4
    Join Date
    17th January 2009
    Posts
    11

    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

  5. #5
    Join Date
    14th July 2004
    Posts
    10,541

    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!

  6. #6
    Join Date
    17th January 2009
    Posts
    11

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

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

    - Al

  7. #7
    Join Date
    16th January 2007
    Posts
    570

    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

    Excel Video Tutorials / Excel Dashboards Reports


  8. #8
    Join Date
    17th January 2009
    Posts
    11

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

    Hey junho lee,

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

    - Al

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Special Characters
    By emc7171 in forum Excel and/or Powerpoint Help
    Replies: 1
    Last Post: September 11th, 2007, 14:24
  2. Special Characters In Web Form
    By DWildman in forum EXCEL HELP
    Replies: 2
    Last Post: August 13th, 2007, 02:41
  3. variables and special characters
    By dircur in forum EXCEL HELP
    Replies: 2
    Last Post: March 12th, 2005, 00:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno